[Rails] Re: ruport-how to send email to multiple recipients

2009-11-13 Thread Marlon
help please. --~--~-~--~~~---~--~~ 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 this group, send email to

[Rails] Wrong number of arguments (0 for 1) in callback method

2009-11-13 Thread Kalpesh1 Patel
I was creating this simple rail application. my controller method looks like this: --- def create() @simple = Simple.new(params[:simple]) ##params coming from view @simple.save end --- And my model class Simple as below: --- class Simple ActiveRecord::Base set_table_name

[Rails] Re: request.session_options broken?

2009-11-13 Thread L1quid
I am also looking for a solution to this problem. It took me long enough to figure out how to set the cookie domain going from Rails 2.2.2 to 2.3.4, now my cookies appear to expire daily instead of never :( On Nov 12, 3:12 pm, James brennanmu...@gmail.com wrote: I'm implementing simple

[Rails] Delegates and building associations

2009-11-13 Thread twiggle
Class User ActiveRecord::Base has_one :profile delgate :description, :description=, :to = :profile end I'd like to do, @user = User.create(:name = 'Foo Bar', :description = 'Slow.') or @user = User.update_attributes(:description = 'Slow') and have AR create/update the profile model and

[Rails] reservation system for hotel

2009-11-13 Thread Greg
Hi, I'm trying to make an app for a small hotel where I could load rooms into a database then assign a different nightly rate to them for each day in a calendar year. Each room would be loaded individually into the DB and and have it's own rate, you would then be able to search for a room by

[Rails] Re: Wrong number of arguments (0 for 1) in callback method

2009-11-13 Thread Frederick Cheung
On Nov 13, 9:00 am, Kalpesh1 Patel rails-mailing-l...@andreas-s.net wrote: When I run this in browser, it throws error Wrong number of arguments (0 for 1). Obviously, my method init_name expects one parameter and it doesn't find any while called(by controller??). Basically I want to send

[Rails] Re: Wrong number of arguments (0 for 1) in callback method

2009-11-13 Thread Kalpesh1 Patel
Frederick Cheung wrote: On Nov 13, 9:00�am, Kalpesh1 Patel rails-mailing-l...@andreas-s.net wrote: When I run this in browser, it throws error Wrong number of arguments (0 for 1). Obviously, my method init_name expects one parameter and it doesn't find any while called(by controller??).

[Rails] Re: Got NoMethodError on Model's find method.

2009-11-13 Thread Frederick Cheung
On Nov 13, 3:50 am, Adinda Praditya apradi...@gmail.com wrote: Hi all, Here's the pastiehttp://pastie.org/694864that describe my situation. If you see the console section, flc is a Clan record. I can ran 'find_all_by_country' method. However, when i ran the 'users_within_country' method,

[Rails] Re: Question about Ruby on Rails Technology

2009-11-13 Thread Frederick Cheung
On Nov 13, 2:22 am, David Chua zhc...@gmail.com wrote: Sounds like something java would be more suited for. To me it sounds like what was described is a client side problem, with relatively little bearing on what the backend is. Fred --~--~-~--~~~---~--~~ You

[Rails] Handle coustom util classes

2009-11-13 Thread Chinna Gogulapati
Hi All, I am new to Ruby, Basically am a java developer. I have webservice, i want to create a view which access the webservice and display result. For that i want to create a util class which access webservice and then access that class in view. so any one can give me an idea how to do this and

[Rails] Re: ruport-how to send email to multiple recipients

2009-11-13 Thread Sijo k g
Hi Marlon require 'ruport' require 'ruport/util' r = Ruport::Report.new r.add_mailer :default, :host = mail.host.com, :address = addr...@host.com r.send_to(t...@host.com) do |mail| mail.subject = Test Report mail.attach test_file.txt mail.text

[Rails] Re: Wrong number of arguments (0 for 1) in callback method

2009-11-13 Thread Leonardo Mateo
On Fri, Nov 13, 2009 at 10:39 AM, Kalpesh1 Patel rails-mailing-l...@andreas-s.net wrote: Frederick Cheung wrote: On Nov 13, 9:00�am, Kalpesh1 Patel rails-mailing-l...@andreas-s.net wrote: When I run this in browser, it throws error Wrong number of arguments (0 for 1). Obviously, my method

[Rails] Re: Passing more than one parameters to redirect_to

2009-11-13 Thread Gamal Zur aue
nas wrote: Whenever you pass more than one parameter in an rjs using redirect_to then it always adds amp; in the beginning of parameters after the first one. I had this issue as well in the past and after spending hours to fix it, I ended up using only redirect_to instead of redirect_to from

[Rails] Re: Wrong number of arguments (0 for 1) in callback method

2009-11-13 Thread Sijo k g
Hi Kalpesh1 Patel So isn't there any way I can pass some value from controller to model? You can define cname as n attr_writer in model and can set its value from controller like @simple.cname = 'namehere' Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Question about Ruby on Rails Technology

2009-11-13 Thread Leonardo Mateo
On Fri, Nov 13, 2009 at 10:42 AM, Frederick Cheung frederick.che...@gmail.com wrote: On Nov 13, 2:22 am, David Chua zhc...@gmail.com wrote: Sounds like something java would be more suited for. To me it sounds like what was described is a client side problem, with relatively little

[Rails] Re: Getting the last record for an each loop?

2009-11-13 Thread Colin Law
2009/11/13 Tony Tony rails-mailing-l...@andreas-s.net: Conrad Taylor wrote: On Thu, Nov 12, 2009 at 7:20 PM, Conrad Taylor conra...@gmail.com wrote: The code is this...   hr/ !-- THIS IS WHAT I NEED TO NOT DISPLAY ON TH LAST RECORD -- % for task in tasks %    ...    % tag :hr unless

[Rails] Re: How to find records

2009-11-13 Thread Colin Law
2009/11/13 Newb Newb rails-mailing-l...@andreas-s.net: Sijo k g wrote: Hi     Just an example here records=Model.find :all, :conditions=[created_on ? ,2.days.ago] Sijo pls if i want to get file how i supposed to do What do you mean by 'get file'? The above code does what you asked,

[Rails] Re: ActiveRecord Typecast

2009-11-13 Thread Colin Law
2009/11/13 David Soronow rails-mailing-l...@andreas-s.net: Hello, It appears that ActiveRecord is not performing any typcasting of model attributes in my rails app.  So, in my app all attributes are loaded from the database as strings (e.g. integers, floats, dates, etc are all loaded as

[Rails] Re: ruport-how to send email to multiple recipients

2009-11-13 Thread Marlon
Thanks for helping Sijo --~--~-~--~~~---~--~~ 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 this group, send email to

[Rails] xml : why is the Model ID field missing

2009-11-13 Thread bingo bob
Sorry if I'm missing something here but I've simply created a respond_to block with an xml type in it so that user can go to www.foo.com/foos.xml and get xml back. Works fine but I need the foo_id in there and I don't see it! How can I force it's inclusion or can you think of a reason why it

[Rails] Re: ruport-how to send email to multiple recipients

2009-11-13 Thread Sijo k g
Hi Marlon Another easy way also there. recipients = [t...@host.com,t...@host.com,] r.send_to(recipients) do |mail| mail.subject = Test Report mail.attach test_file.txt mail.text = This is an email with attached txt end Just test this Sijo -- Posted via

[Rails] Re: Wrong number of arguments (0 for 1) in callback method

2009-11-13 Thread Kalpesh1 Patel
Sijo k g wrote: Hi Kalpesh1 Patel So isn't there any way I can pass some value from controller to model? You can define cname as n attr_writer in model and can set its value from controller like @simple.cname = 'namehere' Sijo Thanks sijo! I am able to get/set it using

[Rails] Re: Wrong number of arguments (0 for 1) in callback method

2009-11-13 Thread Kalpesh1 Patel
Leonardo Mateo wrote: On Fri, Nov 13, 2009 at 10:39 AM, Kalpesh1 Patel rails-mailing-l...@andreas-s.net wrote: when callback method is called? Callbacks like before_create can't take any arguments Fred So isn't there any way I can pass some value from controller to model? What do you

[Rails] Re: Delegates and building associations

2009-11-13 Thread mrbless
Write Something like this in your user model before_create :build_profile_for_this_user def build_proile_for_this_user build_profile end On Nov 13, 7:34 am, twiggle twigbra...@gmail.com wrote: Class User ActiveRecord::Base   has_one :profile   delgate  :description, :description=, :to

[Rails] Re: xml : why is the Model ID field missing

2009-11-13 Thread Sijo k g
Hi Can you paste the code? Is there id in generated xml? Sijo -- 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

[Rails] Re: Question about Ruby on Rails Technology

2009-11-13 Thread Leonardo Mateo
On Fri, Nov 13, 2009 at 11:56 AM, Sijo k g rails-mailing-l...@andreas-s.net wrote: Hi    For just because of curiosity asking..Which technology/technologies can we use for the above scenario? Can we use pure ruby? On server side, I think you can use whatever you want, but for cliente side

[Rails] cookies multiple values

2009-11-13 Thread Cookie Rails
Hello.I want to create a cookie with multiple values and call them individually. How it works? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] select form tag (selected option)

2009-11-13 Thread Al F.
Hello, I'm having problems with form select tag (it wont select the expected value on edit action): % form_for @review do |f| % p %= f.label :customer_service_rating %br / %= f.select :customer_service_rating, options_for_select(1..5), { :include_blank = true } % /p % end %

[Rails] Re: xml : why is the Model ID field missing

2009-11-13 Thread bingo bob
Hi Sijo, thanks for the post... Just for the record this great blog post answered it for me... Needed to use a builder file, in there I can specify just how I'd like the XML. Genius! http://danengle.us/2009/05/generating-custom-xml-for-your-rails-app/ BB -- Posted via

[Rails] Re: Question about Ruby on Rails Technology

2009-11-13 Thread tramuntanal
Look for Java applet, Javascript or Flash technologies. As said it is a client side problem, server technology is independent. Cheers 2009/11/13 hoangnguyenducbk hoangnguyendu...@gmail.com I have one Web project with those requirements: - Show 3D with animation about a house, room,

[Rails] unsubscribe

2009-11-13 Thread Oluwayomi Oluwadara
Hello, Kindly unsubscribe me for now.I will join at a later date because the volume of mails from the forum coming to my inbox is just too much Regards and Respects, Kindness in thought leads to wisdom. Kindness in speech leads to eloquence. Kindness in action leads to love.

[Rails] Re: Please help me ------ Mapping an item to article

2009-11-13 Thread tommy xiao
maybe ajax is satisfied. 2009/11/12 Rails ROR developra...@gmail.com Hi everybody, I have a form like this h1New menuitem/h1 % form_for(@menuitem) do |f| % %= f.error_messages % p %= f.label :title %br / %= f.text_field :title % /p p %= f.label :alias %br /

[Rails] Re: reservation system for hotel

2009-11-13 Thread Trausti Thor Johannsson
Simple. Two tables. Rooms : Has info like double bed, fridge, size and such. costs : might need a better name room_id day price Then you would say something like room has many costs And then I would just use julian dates and you can easily ask each room for dates in a given range.

[Rails] Re: xml : why is the Model ID field missing

2009-11-13 Thread Darian Shimy
You can also override the to_xml method in the model. http://api.rubyonrails.org/classes/ActiveRecord/XmlSerialization.html On Fri, Nov 13, 2009 at 4:59 AM, bingo bob rails-mailing-l...@andreas-s.net wrote: Hi Sijo, thanks for the post... Just for the record this great blog post answered

[Rails] Re: cookies multiple values

2009-11-13 Thread Darian Shimy
Might need more information. If you are looking to store multiple values (e.g., an array) you could convert it to a string for the value of the cookie: cookies[:somename] = some_array.join(:) ... some_array = cookies[:somename].split(:) On Fri, Nov 13, 2009 at 3:51 AM, Cookie Rails

[Rails] Invitation to join Rubyists.EU!

2009-11-13 Thread Julio Javier Cicchelli
Dear Ruby enthusiasts, At the beginning of October, 2009, we embarked on a project, sweeping in both scope and ambition. Inspired by the current integration trends in an ever shrinking world with porous boundaries, we firmly believe that the Internet has dismantled the final barriers that

[Rails] RoR Pre-Sales Consultant - Toronto

2009-11-13 Thread wiz0rd
Hello everyone, happy friday! Any Ruby on Rails Client/Software Consultants in Toronto? Looking for a full time Pre-Sales Engineer, someone who has good experience going to client sites and doing technical presentations to clients, alongside the Account Executive. Experience with RoR is a must

[Rails] Re: Handle coustom util classes

2009-11-13 Thread Darian Shimy
Try the RAILS_ROOT/lib directory in your rails application. You should have access to it in the view as well as other sections. On Fri, Nov 13, 2009 at 1:45 AM, Chinna Gogulapati rails-mailing-l...@andreas-s.net wrote: Hi All, I am new to Ruby, Basically am a java developer. I have

[Rails] Re: How to use link_to for an external reference?

2009-11-13 Thread explainer
Thanks Philip, that syntax had eluded me. So simple. On Nov 12, 10:09 am, Philip Hallstrom phi...@pjkh.com wrote: On Nov 12, 2009, at 10:02 AM,explainerwrote: Suppose I wish to have the following link embedded in one of my views. pa href=http://www.rubyonrails.org; target=_blankRuby

[Rails] Select field value != display on page reload

2009-11-13 Thread bill walton
Greetings! I've got a select field (simple Yes | No) in a form and an observe_field removing / inserting a div via RJS when the select field changes. If the user reloads the page the value of the select field changes, but not the display. That is, the default is 'Yes'. The user changes the

[Rails] Re: cookies multiple values

2009-11-13 Thread Cookie Rails
I am trying to create a list of values in a cookie, to avoid creating more cookies. And then invoke a single value, for example: Cookies [: evidence] = {: value1 = 'one': value2 = '2': value3 = '3'} and then invoke cookies [: tests: value1] but this syntax is wrong. -- Posted via

[Rails] Re: cookies multiple values

2009-11-13 Thread Cookie Rails
I need a cookie because I have store different sessions and use them in different actions of the controller, -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] ticketing/bugtracking plugin for rails

2009-11-13 Thread Christoph Jasinski
Hi, I'm looking for a plugin which would enable my rails application to address bugtracking/ticketing similar to lighthouse. The only dependency I can think of is a user model which I would provide. I only need simple stuff like who what where and state of issue. Any suggestions? Thanks. Chris

[Rails] Re: Learning ruby on Mac - rake create error

2009-11-13 Thread Steve Wilhelm
I am having a similar problem. Did you find a solution? On Nov 8, 12:37 am, dan mr.dan.ma...@gmail.com wrote: so is this mysql default charset as latin1 really a problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: Getting the last record for an each loop?

2009-11-13 Thread Marnen Laibow-Koser
Conrad Taylor wrote: On Thu, Nov 12, 2009 at 5:58 PM, Tony Tony rails-mailing-l...@andreas-s.net wrote: h2%= month.strftime('%B') %/h2 Many thanks! -Tony Tony, you should be able to do something like this: % for task in tasks % ... % tag :hr unless task ==

[Rails] Re: ticketing/bugtracking plugin for rails

2009-11-13 Thread Marnen Laibow-Koser
Christoph Jasinski wrote: Hi, I'm looking for a plugin which would enable my rails application to address bugtracking/ticketing similar to lighthouse. The only dependency I can think of is a user model which I would provide. I only need simple stuff like who what where and state of

[Rails] Net::HTTP question

2009-11-13 Thread jhaagmans
Hi, I'm doing this: response = Net::HTTP.start(host).request_head('/') To check a domain for its response. Now some of the domains checked will not exist and thus produce the following error: SocketError: getaddrinfo: Name or service not known But I don't want my application to fail when

[Rails] Re: How to extend a RESTful route?

2009-11-13 Thread Eric
Well, you could add a 'publish' action to your Document controller and add a 'publish' route. Have you looked at any Rails tutorials yet? -eric On Nov 13, 9:30 am, explainer keburg...@gmail.com wrote: I used the scaffold option to generate a RESTful set of routes to a Document model.  All

[Rails] How to extend a RESTful route?

2009-11-13 Thread explainer
I used the scaffold option to generate a RESTful set of routes to a Document model. All works as described. Now, I wish to extend the controller to add a 'publish' action on DocumentController and add a 'publish' route to mimic what the generated 'create' action does. How do I specify this in

[Rails] Job Post - Ruby on Rails programmer UC Berkeley

2009-11-13 Thread Magee
The Northern California Childhood Leukemia Study of the UC Berkeley School of Public Health is hiring an Applications Programmer to help develop new research and operational systems using Ruby on Rails. Brief summary of the position: The position mainly involves developing and maintaining

[Rails] Re: select form tag (selected option)

2009-11-13 Thread Al F.
This wont work either: %= f.select :customer_service_rating, options_for_select(1..5), { :selected = 2 } % -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Net::HTTP question

2009-11-13 Thread Darian Shimy
Did you try a rescue block: begin response = Net::HTTP.start(host).request_head('/') rescue SocketError = e # Handle error end -- Darian Shimy http://www.darianshimy.com http://twitter.com/dshimy On Fri, Nov 13, 2009 at 9:40 AM, jhaagmans jaap.haagm...@gmail.com wrote: Hi, I'm doing

[Rails] Re: Getting the last record for an each loop?

2009-11-13 Thread Marnen Laibow-Koser
Tony Tony wrote: Hi all, I need a very similar functionality to what is displayed on the group_by Month railscast (http://railscasts.com/episodes/29-group-by-month). The code is this... % @task_months.sort.each do |month, tasks| % h2%= month.strftime('%B') %/h2 % for task in

[Rails] Re: reservation system for hotel

2009-11-13 Thread ChilliCoder
You should also track inventory of rooms and handle a range of dates (periods). Other than that I like it :P On Nov 13, 10:15 am, Trausti Thor Johannsson traust...@gmail.com wrote: Simple. Two tables. Rooms : Has info like double bed, fridge, size and such. costs : might need a

[Rails] Re: Double POST using form_remote_tag ?

2009-11-13 Thread Mike Papper
FYI, here is the entire html form (care of Firebug as some of it is generated via previous Ajax calls): form onsubmit=new Ajax.Request('/article/ajax_add_comment?submit_button_id=submit_comment_button_3000', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return

[Rails] ticketing/bugtracking plugin for rails

2009-11-13 Thread Christoph Jasinski
Thanks for the tip, but Redmine seems to be too big for me. I have several little apps in work, so I was thinking maybe there is a plugin that would extend my app with simple, small bug tracking and progress logic. I would suggest that most project are rather little than big e-commerce site. A big

[Rails] Re: reservation system for hotel

2009-11-13 Thread Marnen Laibow-Koser
Trausti Thor Johannsson wrote: Simple. Two tables. Rooms : Has info like double bed, fridge, size and such. costs : might need a better name room_id day price Then you would say something like room has many costs And then I would just use julian dates and you can easily

[Rails] Re: ticketing/bugtracking plugin for rails

2009-11-13 Thread Joe
Hi Chris, I agree with you -- a lite weight way for users to report a problem. Joe --~--~-~--~~~---~--~~ 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

[Rails] Re: Double POST using form_remote_tag ?

2009-11-13 Thread Mike Papper
Sijo k g wrote: Hi Mike Papper Can you paste your original form_remote_tag code? Sijo % form_remote_tag(:url = {:controller = 'article', :action = ajax_add_comment, :submit_button_id = submit_button_id, :referring_controller_params = @referring_controller_params})

[Rails] Re: request.session_options broken?

2009-11-13 Thread James
If you want all of the session info for your app to persist you can set the expiration in config/initializers/session_store.rb ActionController::Base.session = { :key = '_blog_session', :domain = '.example.com', :expire_after = 1.week # put whetever expiration you want here

[Rails] Re: ticketing/bugtracking plugin for rails

2009-11-13 Thread Aaron Turner
Have you looked at using uservoice.com? On Fri, Nov 13, 2009 at 11:49 AM, Joe j...@crimescenechoppers.com wrote: Hi Chris, I agree with you -- a lite weight way for users to report a problem. -- Aaron Turner http://synfin.net/ http://tcpreplay.synfin.net/ - Pcap editing and replay tools

[Rails] ticketing/bugtracking plugin for rails

2009-11-13 Thread Christoph Jasinski
yea, uservoice.com is really cool, but you have to pay to get some nice features (I got some 0 bugs budget projects). It's great for big players, that can effort the payments and can sort of outsource the issue (*don't get me wrong, I like lighthouse etc.). But me and I think a lot of other rails

[Rails] Migrations w/MySQLdump file (.sql?)

2009-11-13 Thread jrgoodner
Hey there, I'm not super familiar with MySQL, so please forgive me if I say something stupid. I have a large database table (it includes every zipcode in the U.S., along with its city,state,latitude,longitude), and it seems that we are frequently dropping/creating/migrating our database. It

[Rails] Re: Migrations w/MySQLdump file (.sql?)

2009-11-13 Thread Darian Shimy
I would create a new database, load that table in the new database, and create a view from your database used by rails to the new db you created. That way you will only be recreating the view and not the whole table. If you are dealing with indexes on the table, be sure to add the indexes before

[Rails] Re: cookies multiple values

2009-11-13 Thread Darian Shimy
Again I would just serialize the value. On Fri, Nov 13, 2009 at 9:06 AM, Cookie Rails rails-mailing-l...@andreas-s.net wrote: I am trying to create a list of values in a cookie, to avoid creating more cookies. And then invoke a single value, for example: Cookies [: evidence] = {: value1 =

[Rails] Re: Invitation to join Rubyists.EU!

2009-11-13 Thread Leonardo Mateo
On Fri, Nov 13, 2009 at 10:44 AM, Julio Javier Cicchelli javier.cicche...@gmail.com wrote: Dear Ruby enthusiasts, At the beginning of October, 2009, we embarked on a project, sweeping in both scope and ambition. Inspired by the current integration trends in an ever shrinking world with

[Rails] Re: Migrations w/MySQLdump file (.sql?)

2009-11-13 Thread jrgoodner
Thanks for the swift reply! So the application will utilize two databases, one just for the zipcodes table? How would I go about that? Know of any decent references for something like this? On Nov 13, 1:50 pm, Darian Shimy dsh...@gmail.com wrote: I would create a new database, load that

[Rails] Re: Migrations w/MySQLdump file (.sql?)

2009-11-13 Thread Darian Shimy
See if the following will help: # Create two databases in the same server create database zipcode; create database rails; # Create the zipcode table in the zipcode database use zipcode; create table zipdata...; # Switch over to the rails app database and create the view use rails; create or

[Rails] Re: Migrations w/MySQLdump file (.sql?)

2009-11-13 Thread Marnen Laibow-Koser
jrgoodner wrote: Hey there, I'm not super familiar with MySQL, so please forgive me if I say something stupid. I have a large database table (it includes every zipcode in the U.S., along with its city,state,latitude,longitude), and it seems that we are frequently

[Rails] authlogic fails on existing accounts when crypted_password is blank

2009-11-13 Thread Todd A. Jacobs
I recently ran a migration to add the following to an existing user model: t.string crypted_password t.string password_salt t.string persistence_token There is an existing (cleartext) password field, but authlogic doesn't seem to be reading that on existing accounts. As a

[Rails] Re: select form tag (selected option)

2009-11-13 Thread Rick
Use: %= f.select(:customer_service_rating, (1..5).to_a) % On Nov 13, 12:42 pm, Al F. rails-mailing-l...@andreas-s.net wrote: This wont work either: %=     f.select :customer_service_rating, options_for_select(1..5), { :selected = 2 } % -- Posted viahttp://www.ruby-forum.com/.

[Rails] Re: select form tag (selected option)

2009-11-13 Thread Rick
Or, more completely: %= f.select(:customer_service_rating, (1..5).to_a, { :include_blank = true, :selected = 2 } ) % On Nov 13, 7:34 pm, Rick richard.t.ll...@gmail.com wrote: Use:   %= f.select(:customer_service_rating, (1..5).to_a) % On Nov 13, 12:42 pm, Al F.

[Rails] Firefox - Redirect Loop

2009-11-13 Thread doug
Every once in a while I encounter a Firefox error like, Firefox has detected that the server is redirecting the request for this address in a way that will never complete. The thing is that I'm pretty well convinced that FF is dead wrong in its determination. Most of the Google commentary I

[Rails] Re: Firefox - Redirect Loop

2009-11-13 Thread Marnen Laibow-Koser
Doug Jolley wrote: Every once in a while I encounter a Firefox error like, Firefox has detected that the server is redirecting the request for this address in a way that will never complete. The thing is that I'm pretty well convinced that FF is dead wrong in its determination. What has

[Rails] Re: Encoding::UTF_8 missing?

2009-11-13 Thread Rick
Encoding shows up in Ruby 1.9 as part of the multibyte change made to String. That said, Rails 2.3.4 does make reference to Encoding::UTF_8 but those references are conditional. If you look at activesupport-2.3.4/lib/active_support/core_ext/string/multibyte.rb you'll see the gory details. I

[Rails] Re: Encoding::UTF_8 missing?

2009-11-13 Thread Rick
It's hobo that's whacking you. On Nov 13, 5:10 pm, Iain Beeston rails-mailing-l...@andreas-s.net wrote: I've just done a fresh reinstall of OS X Snow Leopard on my mac, and I'm having all kinds of problems with Rails, but the latest problem has me stumped. Whenever I run rake db:seed to

[Rails] Re: Handle coustom util classes

2009-11-13 Thread Marnen Laibow-Koser
Chinna Gogulapati wrote: Hi All, I am new to Ruby, Basically am a java developer. I have webservice, i want to create a view which access the webservice and display result. For that i want to create a util class which access webservice and then access that class in view. so any one can

[Rails] Re: How to extend a RESTful route?

2009-11-13 Thread Todd A. Jacobs
On Fri, Nov 13, 2009 at 09:30:05AM -0800, explainer wrote: I used the scaffold option to generate a RESTful set of routes to a Document model. All works as described. Now, I wish to extend the You might need to tweak this, but I think what you need is: map.login 'publish', :controller

[Rails] how to use methods in application_controller in tests

2009-11-13 Thread Adam Akhtar
Hi I have some protected methods in my application controller to handle logging in users and Id like to be able to use them in my tests. But whenever I try to run my tests i always get errors E.g. NameError: undefined local variable or method `logged_in_user' for

[Rails] [ANN] gettext-2.1.0, gettext_activerecord-2.1.0, gettext_rails-2.1.0

2009-11-13 Thread Masao Mutoh
Hi, Ruby-GetText-Package-2.1.0 and the families (gettext-2.1.0, gettext_activerecord-2.1.0 and gettext_rails-2.1.0) are now available. Ruby-GetText-Package is the library/tools for message localization. * gettext - Message localization libraries and tools for all kind of apps/libs. *

[Rails] `const_missing': uninitialized constant CGI::Session (NameEr

2009-11-13 Thread Smit Shah
Hi all... I am facing the following error `const_missing': uninitialized constant CGI::Session (NameError) While running script/generate controller abc Having any idea Thanks all. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You