Displaying 4 results from an estimated 4 matches for "expenses_controller".
2009 Nov 18
4
rails newbie : routing error
...rails/actionpack/lib/action_view/helpers/form_helper.rb:264:in
`apply_form_for_options!''
vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb:248:in
`form_for''
app/views/expenses/new.html.erb:1:in
`_run_erb_47app47views47expenses47new46html46erb''
app/controllers/expenses_controller.rb:18:in `create''
What I don''t understand is the form_for works fine when used
initially, or even through the
redirect_to new_expense_path
but not through the action => ''new''
Any help is appreciated......
--
You received this message because you are subscr...
2010 Jul 16
31
Added associations but don't see generated methods
Hi,
I''ve got a Rails app working that includes two two classes, etc.:
Expense & Vendor. I eventually learned that the mental concept I had
of their relationship should be express in Rails as:
class Expense < ActiveRecord::Base; belongs_to :vendor; end
class Vendor < ActiveRecord::Base; has_many :expenses; end
2006 Apr 02
2
Problem with lighttpd on mac
...ction_for_pagination''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:188:in
`paginator_and_collection_for''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:124:in
`paginate''
/app/controllers/expenses_controller.rb:8:in `list''
/app/controllers/expenses_controller.rb:3:in `index''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in
`send''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in
`perform_action_w...
2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor
In Expense#new there''s a form with a Vendors-drop-down and a NewVendor-
button.
The latter button brings up Vendor#new.
The Create button in Vendor#new brings up Vendor#show with Edit & Back
links.
I want to append a third link conditionally to Vendor#show: if the
Expense#new form led to the Vendor#show