What am I doing wrong?? (Using rails-2.2.2) Is it a bug
or me?

class TodosController < ApplicationController
  # GET /todos
  # GET /todos.xml
  active_scaffold :todo do |config|
      config.columns[:price].calculate = :sum
      columns[:price].label = "R$ Paid"
  end
end

script/server

Here is the trace:

 NameError in Todos#index


Showing vendor/plugins/active_scaffold/frontends/default/views/
_list_calculations.rhtml where line #12 raised:

undefined local variable or method `_erbout' for #<ActionView::Base:
0xb518c850>

Extracted source (around line #12):

9:         override_formatter = "render_#{column.name}_#
{column.calculate}"
10:         calculation = self.method(override_formatter).call
(calculation) if respond_to? override_formatter
11:
12:         _erbout.concat calculation.to_s
13:         -%>
14:       <% else -%>
15:         &nbsp;

Trace of template inclusion: vendor/plugins/active_scaffold/frontends/
default/views/_list.rhtml, vendor/plugins/active_scaffold/frontends/
default/views/list.rhtml

On Dec 1, 4:59 pm, sanjayayogi <[EMAIL PROTECTED]> wrote:
> Can someone please help me with this.
>
> As a newbie with ActiveScaffold - I have a column of integers, I want
> to calculate the sum.
>
> Where  exactly in my app, do I:
>
> config.columns[:my_column].calculate = :sum
>
> to get ActiveScaffold to calculate the sum? PLEASE BE EXPLICIT:
>
> rails todo
> cd todo
> rake db:create:all
> script/generate scaffold Todo body:text title:string price:integer
> done:boolean
> rake db:migrate
>
> I then install ActiveScaffold into vendors and modify my controllers
> to include activescaffold.
>
> Where do I do the necessary config.columns[:price].calculate = :sum??
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to