Re: [Rails] Re: Undefined method error

2012-07-19 Thread Sam Serpoosh
Ok, of course you can do this. The thing that you should pay attention to is that when the user fill the information in your special form in the home page (including user_email, user_password, micropost_content) you should authorize the user first by his/her user_email and password and the

[Rails] Re: Undefined method error

2012-07-18 Thread One Two
Thank you for the help. Putting @micropost = Micropost.new in pages_controller.rb solved this error. However, I now have a new error which states undefined method `humanize' for nil:NilClass. It says the error is at the line %= f.label @user.email %br /. I defined @user = User.new in

[Rails] Re: undefined method error because I am not understanding Rails initializers

2011-04-25 Thread John Merlino
I restarted the server and it appears to have worked. -- 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: undefined method error

2010-03-31 Thread Hitesh Rawal
Gautam wrote: I am getting the following error when trying to link a method in a view so that it can be called on that very object(id). undefined method `abc_notice_path' for #ActionView::Base:0xed65220 Extracted source (around line #25): 22: %= link_to 'Edit', edit_notice_path(@notice)

[Rails] Re: undefined method error

2010-03-31 Thread Gautam
Thanks for your kind reply. Here is the code of my routes.rb file Please suggest corrections, if any... map.resources :notices map.resources :users, :has_many = :notices map.resource :session map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format'

[Rails] Re: undefined method error

2010-03-31 Thread Jeremy Woertink
Gautam wrote: Thanks for your kind reply. Here is the code of my routes.rb file Please suggest corrections, if any... map.resources :notices map.resources :users, :has_many = :notices map.resource :session map.connect ':controller/:action/:id' map.connect

[Rails] Re: undefined method error despite the fact it doesn't exist

2010-03-19 Thread John Merlino
Billee D. wrote: Hi John, I would check your source code in app/views/resources/index.html.haml (or a view helper for that view) for a typo since it's looking for a method named something similar to what you have (e.g change render_index_row_action_pprove to render_index_row_action_approve)

[Rails] Re: undefined method error despite the fact it doesn't exist

2010-03-19 Thread Aldric Giacomoni
John Merlino wrote: and this is what I get: trunk/log/development.log:ActionView::TemplateError (undefined method `render_index_row_action_pprove' for #ActionView::Base:0x10c5ca938) on line #20 of app/views/resources/index.html.haml: So, what's on line #20 of

Re: [Rails] Re: undefined method error despite the fact it doesn't exist

2010-03-19 Thread Colin Law
On 19 March 2010 14:43, John Merlino li...@ruby-forum.com wrote: Billee D. wrote: Hi John, I would check your source code in app/views/resources/index.html.haml (or a view helper for that view) for a typo since it's looking for a method named something similar to what you have (e.g change

[Rails] Re: undefined method error despite the fact it doesn't exist

2010-03-18 Thread Billee D.
Hi John, I would check your source code in app/views/resources/index.html.haml (or a view helper for that view) for a typo since it's looking for a method named something similar to what you have (e.g change render_index_row_action_pprove to render_index_row_action_approve) HTH On Mar 18, 7:43 

[Rails] Re: Undefined Method error - help request

2009-12-21 Thread SMR
Many thanks, Fred. Your comments were extremely helpful in that they make sense, but I don't understand them well enough to actually turn them into action steps - which suggests I am trying to do things I should not be (yet), hence my 'fishy' code. I'll go back and start from scratch on a

[Rails] Re: Undefined Method error - help request

2009-12-20 Thread Frederick Cheung
On Dec 18, 3:18 pm, SMR srumme...@gmail.com wrote: Good morning All - I am working on a time tracking application as a learning excercise and have run into an error neither I nor Google can remedy. When loading my view, I get an error: 'undefined method 'true_class_path' for

[Rails] Re: undefined method error from atom builder

2009-07-18 Thread Nathan Beyer
Thanks. I was missing the map.resources to that model. I didn't add a helper and it still seems to work. In any case, this was a manually created model, instead of using the Rails script, so that's why it was missing for me. Thanks again. On Jul 12, 8:40 pm, Frederick Cheung

[Rails] Re: undefined method error from atom builder

2009-07-18 Thread Marnen Laibow-Koser
Nathan Beyer wrote: [...] In any case, this was a manually created model, instead of using the Rails script, so that's why it was missing for me. No. script/generate model doesn't generate map.resources statements. You always have to do those yourself if you want them. Best, -- Marnen

[Rails] Re: undefined method error from atom builder

2009-07-12 Thread Frederick Cheung
On Jul 13, 2:12 am, Nathan Beyer nbe...@gmail.com wrote: I have a simple controller that takes a request, looks up some data and then returns the results as either HTML or Atom. The HTML response works fine, but the Atom Builder is blowing up with an undefined method error that I can't

[Rails] Re: Undefined Method error when creating method for collection of objects

2009-04-03 Thread Frederick Cheung
On Apr 3, 12:37 am, Rick rfw...@btinternet.com wrote: Hi Frederick, Once again thankyou for taking the time to respond. I am a little confused by your response. Your method seems to suggest that I pass an argument/array into the method. @phonecalls should already contain all of the

[Rails] Re: Undefined Method error when creating method for collection of objects

2009-04-02 Thread Frederick Cheung
On 2 Apr 2009, at 11:35, Rick wrote: Hi I am learning rails and have hit a bit of a wall. I have created methods previousley that work fine on a single object. However in my latest project I am trying to calculate the total cost of a group of phonecalls and I am having difficulty creating

[Rails] Re: Undefined Method error when creating method for collection of objects

2009-04-02 Thread Matthew MacLeod
On 2 Apr 2009, at 11:59, Frederick Cheung wrote: In my controller I am finding the @phonecalls And in my view I want to say @phoncalls.total_cost The easiest way is probably to create a class method that takes as an argument the array and returns the total cost. You could also run in your

[Rails] Re: Undefined Method error when creating method for collection of objects

2009-04-02 Thread Rick
Hi Matt, Thanks for your time. I thought that by putting my total_cost method in the phonecall model that I was doing exactly that. I appreciate that I can use the view shortcut so thanks for that tip. I do need to understand how to create methods that act upon an array of objects both in this

[Rails] Re: Undefined Method error when creating method for collection of objects

2009-04-02 Thread Frederick Cheung
On Apr 2, 2:00 pm, Rick rfw...@btinternet.com wrote: On Apr 2, 11:59 am, Frederick Cheung frederick.che...@gmail.com wrote: Hi Fred thnaks for your time. I thought that I had created a class method in the (phonecall class) . Do you mean in the array class? And how do I do that. Is it

[Rails] Re: Undefined Method error when creating method for collection of objects

2009-04-02 Thread Rick
Hi Frederick, Once again thankyou for taking the time to respond. I am a little confused by your response. Your method seems to suggest that I pass an argument/array into the method. @phonecalls should already contain all of the array data, no? Why do I need to pass this in. Cant I just

[Rails] Re: Undefined Method error

2008-12-28 Thread Frederick Cheung
On 28 Dec 2008, at 17:04, Daniel wrote: OK. I have 4 models, item/category/subcategory/brand association like following item belongs_to :brands belongs_to :categories belongs_to :subcategories belongs_to should be singular Fred brand has_many :items category has_many :items

[Rails] Re: Undefined Method error

2008-12-28 Thread Daniel
Hi Fred, Sorry that's my fault. in my code actually it's singular. Because brand part works fine :-) item belongs_to :brand belongs_to :category belongs_to :subcategory belongs_to should be singular Fred --~--~-~--~~~---~--~~ You received this message

[Rails] Re: undefined method-error

2008-12-21 Thread Daniel Süpke
Thanks a bunch, that helped. Didn't know that --- is meant to represent an array, YAML::dump could be more intuitive there. It only told me object, so I never even thought of an array. Well, now it works, so thanks again! --~--~-~--~~~---~--~~ You received this