[Rails] Problems upgrading to Rails 2.2.2

2008-12-04 Thread Jakob
Hi all, I've just a new macbook and I need to work with rails 2.2 and not the version as installed with leopard. I updated gems to 1.3.1 without any trouble (using gem update --system) but when i try to install rails with the gem command all i get is this: ERROR: While executing gem ... (NoMeth

[Rails] get event.target in focusin binding function

2008-12-04 Thread Arthur Chan
I am fixing a problem in jQuery.Validator.js. I have to get the current input in the 'onfocusin'. It seems that the "event.target" is what I needed. But how can I get the event object in the follwing binding function? $.extend($.validator, { defaults: { .. onfocusin: functio

[Rails] Re: Get a collection using an array of ids, keeping the order

2008-12-04 Thread Mark Reginald James
If you use MySQL, the "field" function allows you to retrieve records in a specific id order: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/158dc2d879b2fb1/af78ce75ddfa1ed1 -- Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com --~--~-~--~--

[Rails] Re: How to test a plugin

2008-12-04 Thread Arthur Chan
Thanks Fred. It seems that the ar_plugin_skeleton is what I needed. Thanks, Arthur Frederick Cheung wrote: > On Dec 3, 9:13�am, Arthur Chan <[EMAIL PROTECTED]> > wrote: >> Guys, >> >> I've created a plugin, i wanna put my automated test there. >> >> However, I got bad file descriptor error when

[Rails] Re: Should all form elements for a form be in a single div?

2008-12-04 Thread Hassan Schroeder
On Thu, Dec 4, 2008 at 10:26 PM, Ram <[EMAIL PROTECTED]> wrote: > I figured maybe its because all the fields do not fall between the > form_for and end tags. No kidding. For all the "magic" in Rails, you still need to create valid markup. :-) > The "Submit" button did nothing. The form was rend

[Rails] Bug in schema.rb generation during db:migrate

2008-12-04 Thread Teedub
I am thinking that I have found a bug in Rails migrations. My app is using UUIDtools to generate guids for primary keys. To do this I pass :id=>false and then create my own id column as shown below. Next I leverage "execute" to create an index. It seems to work fine. The table in MySql is perfect

[Rails] Re: rails 2.1.2 to rails 2.2.2 now I get mysql issues

2008-12-04 Thread Jason Smith
UPDATE!! Here is what I did and everything is working. I uninstalled Mysqlx64 and Ruby. ran into an issue where Vista kept the service for Mysql even after I unistalled it, so I had to go into the registry and manually delete the service entry. Then I was able to install mysql-essential-5.

[Rails] Should all form elements for a form be in a single div?

2008-12-04 Thread Ram
My layout file is like this.. #printing the controller name <%= yield%> #THIS IS WHERE THE NEW.HTML.ERB IS RENDERED <%= yield :sidebox_1%>

[Rails] collection select bug (?)

2008-12-04 Thread Ram
Consider this code <%= collection_select :cheque, :salary_component, Components.find (:all), :value, :name %> To input the value of a salary component into a Cheque model. salary_component is an attribute of the Cheque model. I want the user to see the name of the component in the select fields

[Rails] Tricky design problem (collection_select and Javascript)

2008-12-04 Thread Ram
Im cornered with this problem in one of my apps. Let me define the models first. Paycheck has_one salstruct, :class_name => 'Salary_Structure' Paycheck belongs_to employee Adjustment #a model for additions/deductions that do not fall into the normal Salary Structure and are last minute add-ons to

[Rails] one controller+5 forms(stages)

2008-12-04 Thread balaji rajagopal
Hi Im using one controller+ 5 forms(5 stages). and i used the code but ony two form data stored in databases.give any suggestion def wizard if params[:stage].nil? ... elsif params[:stage].to_i == 1 ... elsif params[:stage].to_i == 2 ... elsif params[:stage].to_i == 3 .. elsif params[

[Rails] Re: ubiquity-rdoc, better rdoc searching

2008-12-04 Thread Ryan Bigg
You guys could hook it into http://rails.loglibrary.com/lookup. This takes the syntax like Ruby Array#size or Ruby Array size or just distance_of_time_words or just Array and will link you right to the documentation. - Ryan Bigg Freelancer http://frozenplague.net On 05/12/2008, at

[Rails] Re: Subdomains with Rails 2.2

2008-12-04 Thread Ram
Hi, Im looking to implement user based subdomains and catch-all routes into my app. Can subdomain-fu do this? I followed Ryan Bates' railscast on this but he does not go into dynamically added subdomains and routes. Can any of you point me to some resources for getting started on this? Thanks! O

[Rails] SuperInPlaceControl

2008-12-04 Thread Harold
In Rails 2.1, I am using the SuperInPlaceControl plugin to render an in_place_select on an instance of a model with a has_many relationship. So far so good, except that when I click on OK to save the user's selection, the ajax call is posted, the record is updated, but the label on the view never

[Rails] multiple database connections

2008-12-04 Thread Mukund
For multiple database connections, is it better to have a mixin included into the model that does a establish connection on included event or is it better to have an abstract class that establishes the connnection and inherit from the abstract class? In particular, how do Rails handle database

[Rails] Rack Usage

2008-12-04 Thread Karthi kn
Hi, I have started exploring on Rack. But still, I am not able to find the exact usage of the 'Rack'. I want to create a sample application with Rack. Can anybody guide me in this? Can you explain the advantage of the Rack? And can you provide some links for the Rack tutorial? Thanks in advance

[Rails] Problems on "link_to"

2008-12-04 Thread Daniel
I have one problem when I create the index page. I have wrote following in index.html.erb: All Blogs <% @weblogs.each do |page| %> <%= link_to page.title, weblog_path(@weblogs) %> <% end %> and, at first, I create on item and it's url like this http://localhost:3000/w

[Rails] tagging problem?

2008-12-04 Thread srikanth
Hi , I have a table called streams which contain the columns: id name resolution framerate bitrate i have created a web application which is working fine. Here are my doubts: 1)i want to give a tag to my table to find the data from the table.i tried like below but i am not able to give throwing

[Rails] How to setup sybase adapter on Windows xp?

2008-12-04 Thread s70487s
Environment : rails 1.2.6 , ruby 1.8.6 , Windows xp I tried to use the command (gem install activerecord-sybase-adapter) to install my adapter, but I got this error message. "database configuration specifies nonexistent sybase adapter (ActiveRecord::AdapterNotFound)" Then, I try to follow this

[Rails] How to set the focus to a specified field in a form

2008-12-04 Thread Patrick Doyle
This is probably a general HTML question, but I'll ask it here anyway. Is there any way to set the focus to a specific field in a form generated in a view? The little I've found on so far suggests that I need to add some javascript to do this. I can go figure out how to do that, but it seems lik

[Rails] paypal integration with rails project

2008-12-04 Thread Ruhul Amin
Hello experts, In my rails project I have to integrate paypal payment system. This is my first project in which I have to integrate paypal. Please show me ways to do this as I have no idea. Thanks in advanced. Amin -- Posted via http://www.ruby-forum.com/. --~--

[Rails] tzinfo_timezone plugin - Object::TimeZone not defined

2008-12-04 Thread Shantanu Pavgi
I am trying to get my rails project working on a new machine. I am using OpenSuse 10.3 and following steps were performed, 1. installed rubygems 2. installed Rails (1.x) using Suse repository - it didn't have latest version. 3. updated gem version and Rails version. 4. installed other gems such rc

[Rails] Re: rails 2.1.2 to rails 2.2.2 now I get mysql issues

2008-12-04 Thread Jason Smith
Frederick Cheung wrote: > On Dec 4, 10:11�pm, Jason Smith <[EMAIL PROTECTED]> > wrote: >> Frederick Cheung wrote: >> > On Dec 4, 9:41 pm, Jason Smith <[EMAIL PROTECTED]> >> > wrote: >> >> > Craig >> >> I did look at both of these links earlier in my search to fix this >> problem, one or both of th

[Rails] Re: rails 2.1.2 to rails 2.2.2 now I get mysql issues

2008-12-04 Thread Frederick Cheung
On Dec 4, 10:11 pm, Jason Smith <[EMAIL PROTECTED]> wrote: > Frederick Cheung wrote: > > On Dec 4, 9:41 pm, Jason Smith <[EMAIL PROTECTED]> > > wrote: > >> > Craig > > I did look at both of these links earlier in my search to fix this > problem, one or both of these linkscan't quite remember

[Rails] Re: rake test fails - pending migrations

2008-12-04 Thread Shantanu Pavgi
Thank you very much for your inputs... - Shantanu. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonr

[Rails] rake db:migrate:reset

2008-12-04 Thread [EMAIL PROTECTED]
When I do a "rake db:migrate:reset" does this erase/drop the "schema_migrations" db so that all the migrations are then rerun or applied in order? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: rails 2.1.2 to rails 2.2.2 now I get mysql issues

2008-12-04 Thread Jason Smith
Frederick Cheung wrote: > On Dec 4, 9:41�pm, Jason Smith <[EMAIL PROTECTED]> > wrote: >> > Craig >> >> Well I am running mysql x64, unfortunately there isn't a proper 64 bit >> gem(I've searched). �What I don't understand though is how it was >> running fine with just an error message(not an error

[Rails] Re: rails 2.1.2 to rails 2.2.2 now I get mysql issues

2008-12-04 Thread Frederick Cheung
On Dec 4, 9:41 pm, Jason Smith <[EMAIL PROTECTED]> wrote: > Craig Demyanovich wrote: > > You wrote that you're running Vista 64-bit and > > mysql-essential-5.0.67-winx64, yet the gem seems to be for win32: > > mysql-2.7.3-x86-mswin32. Could it be that you need a mysql gem for win64 > > (is > > t

[Rails] Re: rails 2.1.2 to rails 2.2.2 now I get mysql issues

2008-12-04 Thread Jason Smith
Craig Demyanovich wrote: > You wrote that you're running Vista 64-bit and > mysql-essential-5.0.67-winx64, yet the gem seems to be for win32: > mysql-2.7.3-x86-mswin32. Could it be that you need a mysql gem for win64 > (is > there one?) or that you need to run mysql for win32 instead of win64? >

[Rails] Re: How to associate one model from 2 models

2008-12-04 Thread Jeff
On Dec 4, 3:05 pm, Rémi Gagnon <[EMAIL PROTECTED]> wrote: > I know, I have probably a wrong design.  Just need your point of view on > that. > > Here is > > Police has many products > Police has many transactions > Products has many transactions > > I need to get a transaction with the combination

[Rails] Re: rails 2.1.2 to rails 2.2.2 now I get mysql issues

2008-12-04 Thread Craig Demyanovich
You wrote that you're running Vista 64-bit and mysql-essential-5.0.67-winx64, yet the gem seems to be for win32: mysql-2.7.3-x86-mswin32. Could it be that you need a mysql gem for win64 (is there one?) or that you need to run mysql for win32 instead of win64? Just guessing really, since I don't run

[Rails] Re: Problem upgrading from Rails 2.0.2 to 2.2.2

2008-12-04 Thread Xlash
The following command is deprecated in Rails 2.2.2 in config/environments/development.rb config.action_view.cache_template_extensions = false Regards, Guillaume On 22 nov, 09:54, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On Nov 22, 10:10 am, Schalk Neethling <[EMAIL PROTECTED]> > wr

[Rails] Re: Help passing attributes

2008-12-04 Thread srj
I was trying something like that. My first form starts with: . . . In my controller, I do this: def register @user = User.create() end But when I inspect (using NetBeans debugger) the params hash, passedUser is an empty string. I was expecting the User

[Rails] How to associate one model from 2 models

2008-12-04 Thread Rémi Gagnon
I know, I have probably a wrong design. Just need your point of view on that. Here is Police has many products Police has many transactions Products has many transactions I need to get a transaction with the combination of police and product. Is it feasible to defines associations to do that.

[Rails] Re: Help with ruby query!

2008-12-04 Thread Hassan Schroeder
On Thu, Dec 4, 2008 at 11:28 AM, Jay Mark <[EMAIL PROTECTED]> wrote: > > The problem could be the query because when I search for one record, it > works. > In SQL, the query will be: > SELECT name, age > FROM authors > WHERE age = 'the selected age' // the value, not the id of the selected > age

[Rails] Re: rails 2.1.2 to rails 2.2.2 now I get mysql issues

2008-12-04 Thread Jason Smith
Anyone know anywhere else I might be able to post this question and get a response? I'd really like to get back to development, and would prefer not to have to roll back to Rails 2.1.2. thanks, Jason -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~--

[Rails] Re: rake test fails - pending migrations

2008-12-04 Thread Phlip
Shantanu Pavgi wrote: > But then what is the purpose of db:migrate:down (and self.down method in > migration file)? On a deployed database, the only direction should be up. If you deploy a new version, and encounter an emergency, the cap rollback feature cannot roll your database back. If the

[Rails] Re: MySQL gem 2.7 not finding mysql.so

2008-12-04 Thread Frederick Cheung
On 4 Dec 2008, at 19:26, ebdb <[EMAIL PROTECTED]> wrote: > > ruby 1.8.7 > Rails 2.2.2 > mysql gem 2.7 > Linux 2.6.18-92.el5 > > Hey guys. The MySQL gem is puzzling me. When I run irb> require > 'mysql' I get the error shown below: > > 1. irb(main):001:0> require 'rubygems' > 2. => true >

[Rails] Re: Help with ruby query!

2008-12-04 Thread Jay Mark
The problem could be the query because when I search for one record, it works. So, this works fine without the query and the loop. Author Name Age <%=h @author.name %> <%=h @author.age %> <% end %> But this returns one 'Name' for the selected 'age'. That means it is returning the

[Rails] MySQL gem 2.7 not finding mysql.so

2008-12-04 Thread ebdb
ruby 1.8.7 Rails 2.2.2 mysql gem 2.7 Linux 2.6.18-92.el5 Hey guys. The MySQL gem is puzzling me. When I run irb> require 'mysql' I get the error shown below: 1. irb(main):001:0> require 'rubygems' 2. => true 3. irb(main):002:0> require 'mysql' 4. LoadError: libmysqlclient.so.16: cann

[Rails] Re: problem installing the newest version of Rails

2008-12-04 Thread frank95a
Thanks Fred, that helped a bit. I also had to manually move sqlite3.dll and sqlite.def to the bin directory ( I had them from a previous install) Regards, Frank On Dec 4, 11:12 am, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On Dec 4, 7:07 pm, frank95a <[EMAIL PROTECTED]> wrote: > > > > > Hi

[Rails] Re: problem installing the newest version of Rails

2008-12-04 Thread Frederick Cheung
On Dec 4, 7:07 pm, frank95a <[EMAIL PROTECTED]> wrote: > Hi, > > I am just upgrading from 2.0.2 to 2.2.2 and see a lot of changes but > nothing on the release notes. > > The problem I am facing right now is when I use the rake db:migrate to > create the tables, I get the following error: > > rak

[Rails] problem installing the newest version of Rails

2008-12-04 Thread frank95a
Hi, I am just upgrading from 2.0.2 to 2.2.2 and see a lot of changes but nothing on the release notes. The problem I am facing right now is when I use the rake db:migrate to create the tables, I get the following error: rake aborted! no such file to load -- sqlite3 I have installed sqlite3 sep

[Rails] Re: Help passing attributes

2008-12-04 Thread Thorsten Müller
Ok, so in action continue_registraton you have this user_id It should be part of the second form, so it is handed over to the third one. Commonly that's done with a hidden field in the second form: (assuming, it's in params[:user_id]) <%= f.hidden_field :user_id, :value => params[:user_id] %> ju

[Rails] Help passing attributes

2008-12-04 Thread srj
I know this is a really basic and simple thing for Rails, but as a newbie, I am having trouble figuring it out . . . I have a home page with a register link which executes the register action and shows the first (of two) registration page. When I click the "Continue" button, I want to go to the

[Rails] background process with ruby on rails

2008-12-04 Thread Jason
Here is what I'm trying to do. (not sure how to do steps 2 and 3) 1. User uploads a file to server ( i know how to do this ) 2. once uploaded a background process needs to be run on the file (could take a minute of 2 to complete) 3. display the results of the processing back to the user. (either

[Rails] Re: Thin web server

2008-12-04 Thread Fernando Perez
Karthi kn wrote: > Hi, > > Today only I came to know about 'thin' web server. I have installed the > gem and used it. But I don't know whether 'thin' web server is better > than webrick or mongrel. If so, can you please compare these web > servers? > > > Thanks in advance... The main advantage

[Rails] Re: Help with ruby query!

2008-12-04 Thread Thorsten Müller
> It is pointing to the line with the loop: > <% @results.each do |result| So for one reason or another @results is nil Most likely your query doesn't return any records. (btw: you better name that @authors instead of @results for readablity) So what is in params[:authors] ? Where does this para

[Rails] Re: Help with habtm models in one form

2008-12-04 Thread Navjeet Chabbewal
I did something like this in the past in a similar situation. I have a drop down of categories that has all the valid categories and an additional category injected as 'New Category'. When you user selects the 'New Category' from the drop down, I display another textbox (I did this with ajax c

[Rails] Re: Help with ruby query!

2008-12-04 Thread Jay Mark
I made those changes, but I am still getting this error: "You have a nil object when you didn't expect it!" It is pointing to the line with the loop: <% @results.each do |result| My model look like this: class Author < ActiveRecord::Base has_many :books def author_age @results = Author.f

[Rails] Help with habtm models in one form

2008-12-04 Thread Fatih Genç
Hi I have a post and a category model class Post < ActiveRecord::Base has_and_belongs_to_many :categories end class Category < ActiveRecord::Base has_and_belongs_to_many :posts end I created join table migration files Now I wanna create category while creating post I mean user can choose category

[Rails] [Jobs] Computer games /Great Opportunity in Management / Think of "EJB" building that in Ruby / NYC Area

2008-12-04 Thread Smiley
Leading publisher of mobile games and personalization applications is seeking a Director of Server Engineering to lead its server engineering group. The Director of Server Engineering works with the Company's product development management team to plan and manage the production of products and too

[Rails] I will be offering an online Ruby on Rails class

2008-12-04 Thread gerry.jenk...@gmail.com
This Spring, I will be teaching a online Ruby on Rails class to cover the basics from 2/2/09 and runs till 5/27/09 (15 weeks). It is a Long Beach Community College Class for credit. See: http://cbis.lbcc.edu/ruby-on-rails-online-class/ for more detailed information. email me at [EMAIL PROTECTE

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Bill Walton
Hi Dave, Dave Smith wrote: > On Dec 4, 2:37�pm, Dave Smith <[EMAIL PROTECTED]> > wrote: >> Frederick Cheung wrote: > >> As a quick secondary question, I was wondering why >> when I have a button to delete the image from the >> database it works perfectly in the edit.html.erb file, but >> when I

[Rails] Re: Help with ruby query!

2008-12-04 Thread Thorsten Müller
<% @results.each do |result| %> // I am not sure if this is right! <%=h @result.name %> <%=h @result.age %> should be <% @results.each do |result| %> // I am not sure if this is right! <%=h result.name %> <%=h result.age %> <% end %> --~--~-~--~~~--

[Rails] Re: Help with ruby query!

2008-12-04 Thread Jay Mark
Thanks a lot Mr. Fred. Now, I am having trouble with displaying the query result on authors\show.html I am having problems referencing the returned object and getting the two columns displayed. The error is: "You have a nil object when you didn't expect it!" I have this in my model: class Au

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Ar Chron
Dave Smith wrote: > > booger is there a potential workaround? Umm... don't use that helper? You can always construct the control yourself. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: rake test fails - pending migrations

2008-12-04 Thread Ar Chron
Shantanu Pavgi wrote: > Thanks for the help. > > But then what is the purpose of db:migrate:down (and self.down method in > migration file)? The method self.down does roll back any changes if > needed, but its effects are not reflected in other areas such as 'rake > test'. Migrations really s

[Rails] problems with view_paths

2008-12-04 Thread Ralph Herve
Hello i'm trying do add view paths to my project In my local machine it is working fine but when i'm trying to host my project it is not working i don't understand why? I'm using rails 2.0.2 This is my controller class FrontEndController < ApplicationController before_filter :get_site be

[Rails] Re: rake test fails - pending migrations

2008-12-04 Thread Shantanu Pavgi
Thanks for the help. But then what is the purpose of db:migrate:down (and self.down method in migration file)? The method self.down does roll back any changes if needed, but its effects are not reflected in other areas such as 'rake test'. I am probably going to do 'rake db:migrate:down' and

[Rails] Re: ubiquity-rdoc, better rdoc searching

2008-12-04 Thread Jens Wille
Cipriani [2008-12-04 16:56]: > Hi Jean, jens > Yesterday I started a branch on Github for working in persistent > indexes when using rdoc-load. But improvements on search is also > in my todo list. already cloned it and checked out that branch ;-) very interesting! > Anyone could contribut

[Rails] Re: ubiquity-rdoc, better rdoc searching

2008-12-04 Thread Cipriani
Hi Jean, Yesterday I started a branch on Github for working in persistent indexes when using rdoc-load. But improvements on search is also in my todo list. Anyone could contribute, of course. Thanks for the suggestion, Cipriani On Dec 4, 12:46 pm, Jens Wille <[EMAIL PROTECTED]> wrote: > hi lu

[Rails] Route alias

2008-12-04 Thread Helmut Juskewycz
Hi, the Rails app I am currently working on will have a public API (REST) so other can communicate with it. I am thinking right now which URLs to use. I saw some apps which use a prefix for their API, e.g. /api/v1/projects... I am not quite sure if this is really necessary, I mean if the app is

[Rails] Re: JOBS : ProKarma Need Ruby on Rail Developer/ CA

2008-12-04 Thread Chris Conrey
Shveta, Are you looking to fill an internal team or just looking for some project work? Chris Conrey On Wed, Dec 3, 2008 at 1:24 PM, Shveta <[EMAIL PROTECTED]> wrote: > > Hello Folks, > > We need Ruby on Rails Developer in Bay Area. Please let me know if > anyone interested. > > Please get back

[Rails] Re: Using a model in a library

2008-12-04 Thread Andrew Bloom
Sounds like you just need a line like this in the top of the lib file: require 'app/models/aircraft' If its already loaded (ie: running script/server) nothing will change, but if its not already loaded (I don't use RSpec, but it sounds like its not autoloading classes) this should fix it. You mi

[Rails] Re: Full text search using tsearch2

2008-12-04 Thread VP
thanks for the tips. As documentation thinksphinx has nice railscast about. But geocoding searches for example are not documented until now (or at least, until last week hehe) Regards, Victor On Dec 4, 3:02 pm, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On 4 Dec 2008, at 13:39, VP wrote: > >

[Rails] Re: Needs some help with eager loading issue on a has_many through relationship

2008-12-04 Thread hoenth
Philip/Fred thank you for your thoughts. it never ceases to amaze me how some things manage to fix themselves. After looking into this for a couple of hours over the last two days, I reran the page today, and checking into the development log found that I am now down to 3 queries. The homeroom

[Rails] Action caching with dynamic cache names

2008-12-04 Thread Lundie
Hi, I am attempting to cache a page that varies depending on the URL that you go to. For example, http://mydomain.com/member_name goes to the same action and controller as http://mydomain.com/other_member, but the page is customized to the member. I am currently accomplishing this with the foll

[Rails] Re: can i create web page with web page

2008-12-04 Thread Edson Lopes
You can But your going to have problems with server-side code on the pages (they stay on DB and do not have the server process influence, so cannot be processed), depending on how you are doing. Use Drupal (CMS) to see how it works first... This can help. On Thu, Dec 4, 2008 at 11:47 AM, mah

[Rails] Re: can i create web page with web page

2008-12-04 Thread Mahmoud Said
are u sure u r not looking for a CMS ?? On Thu, Dec 4, 2008 at 4:47 PM, mahmoud_cs <[EMAIL PROTECTED]>wrote: > > can i create web page with web page using ajax in run time > > > -- Mahmoud Said Software Developer blog.modsaid.com www.eSpace.com.eg --~--~-~--~--

[Rails] permalink_fu and Rails 2.2.2

2008-12-04 Thread Fernando Perez
Hi, Since I have updated my Rails gems to 2.2.2, when I create a new entry in DB which has a permalink I get the following error message: uninitialized constant ActiveSupport::Multibyte::Handlers Do you know if permalink_fu is compatible with Rails 2.2.2? Is there an option I have forgotten to p

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Dave Smith
Frederick Cheung wrote: > On Dec 4, 2:37�pm, Dave Smith <[EMAIL PROTECTED]> > wrote: >> Frederick Cheung wrote: > >> As a quick secondary question, I was wondering why when I have a button >> to delete the image from the database it works perfectly in the >> edit.html.erb file, but when I move th

[Rails] can i create web page with web page

2008-12-04 Thread mahmoud_cs
can i create web page with web page using ajax in run time --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubsc

[Rails] Re: ubiquity-rdoc, better rdoc searching

2008-12-04 Thread Jens Wille
hi luis! Cipriani [2008-12-04 14:31]: > I wrote a set of Mozilla Ubiquity commands that allow the user to > search on rdocs, also featuring autocomplete, load of any rdoc > hosted on the web and changing the default rdoc when searching. wow, awesome! now i know how much i missed that :-) maybe w

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Frederick Cheung
On Dec 4, 2:37 pm, Dave Smith <[EMAIL PROTECTED]> wrote: > Frederick Cheung wrote: > As a quick secondary question, I was wondering why when I have a button > to delete the image from the database it works perfectly in the > edit.html.erb file, but when I move the button into the _form.html.erb

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Dave Smith
Frederick Cheung wrote: > On 4 Dec 2008, at 13:53, Dave Smith wrote: > >># link_to image_tag(article_img), >> article.article_image.public_filename >> >> link_to 'click me', article_img, >> article.article_image.public_filename > > Well you are. > Just > link_to 'click me',

[Rails] Re: Help with ruby query!

2008-12-04 Thread Frederick Cheung
On 4 Dec 2008, at 14:28, Jay Mark wrote: > > class Author < ActiveRecord::Base > has_many :books > > def author_age >Author.find :all, (:conditions => ["age = ?", params[:authors]]) >end > > end > > What I want to do is to display all author's name base on the selected > age. > > pleas

[Rails] Re: Help with ruby query!

2008-12-04 Thread Jay Mark
Thanks for the info guys. Now I am getting this error coming from the author's model: "syntax error, unexpected tASSOC, expecting ')'" This is what I have in author's class class Author < ActiveRecord::Base has_many :books def author_age Author.find :all, (:conditions => ["age = ?", p

[Rails] Re: Full text search using tsearch2

2008-12-04 Thread Frederick Cheung
On 4 Dec 2008, at 13:39, VP wrote: > > >> Whow, so you read Postgres code before using it? ;-) >> Same goes for Ruby, Rails, and 99% of what tools we use. > > lol.. no, i mean at least the contrib/tsearch folder i read! ok the > http://www.postgresql.org/docs/8.3/static/textsearch.html as well,

[Rails] Re: Full text search using tsearch2

2008-12-04 Thread Thorsten Müller
> Thanks for the tip about ultrasphinx, but i would like to know if its > possible to do opposite, to make it work with lexemes. Like for > example if you look for run, you will find run, runs, ran and running. > All of these words are forms of the same lexeme: RUN hmm, I don't know about "ran" b

[Rails] Re: Subdomains with Rails 2.2

2008-12-04 Thread Perry D
That's awesome. I put that code into my application.rb file and it seems to work great! In addition, I am looking to a couple of other subdomains not attached to accounts (ie- admin.domain.com). I installed the request_routing plugin and it seems to work great. It gives me some good options withi

[Rails] ubiquity-rdoc, better rdoc searching

2008-12-04 Thread Cipriani
Hi everyone, I wrote a set of Mozilla Ubiquity commands that allow the user to search on rdocs, also featuring autocomplete, load of any rdoc hosted on the web and changing the default rdoc when searching. The project is hosted here: http://projects.talleye.com/ubiquity-rdoc and GitHub. Please

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Frederick Cheung
On 4 Dec 2008, at 13:53, Dave Smith wrote: > > Frederick Cheung wrote: >> On 4 Dec 2008, at 13:36, Dave Smith wrote: >> > "/article_images//0047/Photo_59.jpg":String > Extracted source (around line #12): > What's the rest of that stack trace? Fred >>> >> looks like

[Rails] Re: Get a collection using an array of ids, keeping the order

2008-12-04 Thread Rob Biedenharn
On Dec 4, 2008, at 7:46 AM, Max Williams wrote: > Frederick Cheung wrote: >> On 4 Dec 2008, at 12:31, Frederick Cheung wrote: >> @resources = [] array.each{|id| @resources << Resource.find(id)} But, this requires n Find calls which isn't acceptable. >>> >>> Resource.find @resou

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Dave Smith
Frederick Cheung wrote: > On 4 Dec 2008, at 13:36, Dave Smith wrote: > "/article_images//0047/Photo_59.jpg":String Extracted source (around line #12): >>> What's the rest of that stack trace? >>> >>> Fred >> > looks like you're passing that string to link_to twice. > > Fred u

[Rails] Re: Does animated gif will work properly using RMagick?

2008-12-04 Thread Rob Biedenharn
On Dec 4, 2008, at 3:56 AM, dare ruby wrote: > Dear all, > > I have used RMagic to read and write a image while uploading. An > animated gif was read from my local machine and was written in my > images > folder using RMagick. But the animated gif which i read was witten > in my > folder witho

[Rails] Re: Full text search using tsearch2

2008-12-04 Thread VP
> Whow, so you read Postgres code before using it? ;-) > Same goes for Ruby, Rails, and 99% of what tools we use. lol.. no, i mean at least the contrib/tsearch folder i read! ok the http://www.postgresql.org/docs/8.3/static/textsearch.html as well, and too be honest its better documented then th

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Frederick Cheung
On 4 Dec 2008, at 13:36, Dave Smith wrote: > > Frederick Cheung wrote: >> On 4 Dec 2008, at 13:14, Dave Smith wrote: >> >>> i have made changes but now get the error... >>> >>> Showing admin/articles/edit.html.erb where line #12 raised: >>> >>> undefined method `stringify_keys' for >>>

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Dave Smith
Frederick Cheung wrote: > On 4 Dec 2008, at 13:14, Dave Smith wrote: > >>> >> i have made changes but now get the error... >> >> Showing admin/articles/edit.html.erb where line #12 raised: >> >> undefined method `stringify_keys' for >> "/article_images//0047/Photo_59.jpg":String >> Extrac

[Rails] Re: Ruby fun with MegaMillions

2008-12-04 Thread Rob Biedenharn
On Dec 4, 2008, at 1:55 AM, Ryan Bigg wrote: > I estimate you need to run this at least 550,731,822 times in order > to get the same numbers twice. > - > Ryan Bigg > Freelancer > http://frozenplague.net > > On 04/12/2008, at 2:43 PM, Sunny Beach wrote: > >> I thought I would write a lottery

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Frederick Cheung
On 4 Dec 2008, at 13:14, Dave Smith wrote: > > Frederick Cheung wrote: >> On Dec 3, 11:00�am, denver <[EMAIL PROTECTED]> wrote: >> >>> def article_image_for(article) >>> � � � � if article.article_image >>> � � � � � � article_img = >>> article.article_image.public_filename >>> � � � � � � lin

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-04 Thread Frederick Cheung
On 4 Dec 2008, at 13:10, sreekanth.G wrote: > > Hi > > i am clear abot that but > if i write below >>> article_tag_with('tagname') > undefined methos article > how can i do this? > thanks Well that's the same thing. you've got to set article to be an instance of article before you can call ar

[Rails] Re: Full text search using tsearch2

2008-12-04 Thread Thorsten Müller
> In ultrasphinx, the document is broken in tokens and > everything bigger then 2 chars is indexed. So in my opinion, it > generates too much "false positives" (sorry guys, i could not find > another word).. there is any way to make *sphinx index lexeme ? > Sure, you can configure min_infix_len,

[Rails] Re: Full text search using tsearch2

2008-12-04 Thread VP
Hey Robby, Thanks for your feedback, > > Victor, > > As a long-time PostgreSQL advocate... I'd encourage you to look at > using Sphinx and/or UltraSphinx. In fact, I used ultrasphinx, and with an average load, it wasnt uncommon to have to restart ultrasphinx daemons. Another point that, i tried

[Rails] Re: image text link instead of image_for help!

2008-12-04 Thread Dave Smith
Frederick Cheung wrote: > On Dec 3, 11:00�am, denver <[EMAIL PROTECTED]> wrote: > >> def article_image_for(article) >> � � � � if article.article_image >> � � � � � � article_img = article.article_image.public_filename >> � � � � � � link_to image_tag(article_img), >> article.article_image.public

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-04 Thread sreekanth . G
Hi i am clear abot that but if i write below >>article_tag_with('tagname') undefined methos article how can i do this? thanks On Thu, Dec 4, 2008 at 6:37 PM, Frederick Cheung <[EMAIL PROTECTED]> wrote: > > > On 4 Dec 2008, at 06:55, sreekanth.G wrote: > >> >> hi thorsten >> >> on console i have

[Rails] Re: Render and/or redirect were called multiple times in this action

2008-12-04 Thread Mahmoud Said
It seems the same filter is being executed for the redirected action too... so u r in infinite loop make sure the filter is skipped for the action you are redirecting to. use this before_filter :check_enabled_flag, :except=>[:disabled] On Thu, Dec 4, 2008 at 1:08 AM, BarefootSanders <[EMAIL P

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-04 Thread Frederick Cheung
On 4 Dec 2008, at 06:55, sreekanth.G wrote: > > hi thorsten > > on console i have tried below commonds: > >>> Article.find(1) > working fine >>> article.tag_list > giving error like unfdefined local variable or method article Well yes - you haven't defined article. if you do article = Article.f

[Rails] Re: Problem with destroying multiple records........

2008-12-04 Thread Dharmdip Rathod
Thx, -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from

[Rails] Re: attatchment fu - NO DELETE ability

2008-12-04 Thread denver
dont worry. i fixed the problem. it was because the button was inside a _form page and so the variables were not passed across On Dec 4, 12:28 pm, denver <[EMAIL PROTECTED]> wrote: > Ive also tried > > def delete_article_image >                 @article = Article.find(params[:id]) >            

  1   2   >