I have one active_scaffold model stuff
class StuffsController < ApplicationController
active_scaffold :stuff do |config|
config.columns = [:name,:price, :quantity,:sum_items]
config.create.columns = [:name, :price, :quantity]
config.update.columns =[:name, :price, :quantity]
end
end
And in my Helper
def sum_items_to_column(record)
record.price * record.quantity
end
But, after I created a new stuff, I've got an no method error,
undefined method `sum_items' for #<Stuff:0x103674d60>
Why I got this kind of error message?
Sorry I'm a newbie of AS
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.