Displaying 5 results from an estimated 5 matches for "members_control".
2006 Feb 28
3
Object#id will be deprecated?
I didn''t get the memo on this :P
members_controller.rb:12: warning: Object#id will be deprecated; use
Object#object_id
Line 12 is:
@member = Member.find(@current_member.id)
How _should_ I be writing that line?
Thanks,
Joe
--
Posted via http://www.ruby-forum.com/.
2009 Sep 19
5
How to: redirect_to through a folder hierarchy (upwards)
Hi there,
how do I tell the current controller correctly to redirect_to an action
of another controller that is 1 level higher in the folder hierarchy
than the current controller?
How I have tried: Within the current controller (called ''incidents''), I
have put:
redirect_to :controller => ''members'', :action => ''show'', :id =>
2007 Dec 13
4
Attachment_fu problems on updates
On the creation of a member the member''s picture uploads as it should.
However, when updating the member, while selecting a new picture, an
error is thrown:
can''t convert nil into String
RAILS_ROOT: /Users/chris/Documents/Projects/Rails/CommunityCMS/trunk
Application Trace | Framework Trace | Full Trace
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code:
@project_pages, @projects= paginate :project,
:per_page => 10,
:conditions => ["account_id = ?", account]
?!
If only I could pass the sub-collection
account = ...
@projects = account.project
to paginate, instead of letting it extract it with a find :all + sql
conditions
Alain.
--
Posted via
2007 Dec 14
5
How do I mock params?
...handling PUT /members/1 should find the member
requested''
You have a nil object when you didn''t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
/Users/chris/Documents/Projects/Rails/CommunityCMS/trunk/app/controllers/members_controller.rb:69:in
`update''
/Users/chris/Documents/Projects/Rails/CommunityCMS/trunk/vendor/rails/actionpack/lib/action_controller/base.rb:1168:in
`send''
-------
I have read how to set the flash and session vars, but I haven''t found
anything on the params.
Thanks for the help...