Hi Sergio/Ben

Problem solved by changing config.columns to conf.columns :-)
Will be using conf.columns as auto-inserted by Rails 5.01
That was why the active_scaffold_export work as it was using conf.column

Cheers !

On Friday, 3 February 2017 20:26:55 UTC+8, Sergio Cambra wrote:
>
> Parameter in block is conf and you are using config. Replace 
> config.columns with 
> conf.columns, or change |conf| with |config|. 
>
> I think your issue about activescaffold ignoring setting columns is the 
> same. 
>
> El jueves, 2 de febrero de 2017 20:16:44 (CET) Chee Chong Hwa escribió: 
> > Fresh project also crash 
> > 
> > TypeError in EmployeesController#index 
> > no implicit conversion of Symbol into Integer 
> > Extracted source (around line *#4*): 
> > 
> > 2 
> > 3 
> > 4 
> > 5 
> > 6 
> > 7 
> > 
> > 
> >   active_scaffold :"employee" do |conf| 
> >     config.columns = [:eno, :ename, :dept, :date_join, :position, 
> > :superior,:active, :memo] config.columns[:ename].description = "Enter 
> the 
> > users first and last name" end 
> > end 
> > 
> > Rails.root: C:/RubymineProjects/test-as 
> > Application Trace <http://localhost:3000/employees#> | Framework Trace 
> > <http://localhost:3000/employees#> | Full Trace 
> > <http://localhost:3000/employees#> 
> > 
> > app/controllers/employees_controller.rb:4:in `[]' 
> > <http://localhost:3000/employees#> 
> > app/controllers/employees_controller.rb:4:in `block in 
> > <class:EmployeesController>' <http://localhost:3000/employees#> 
> > app/controllers/employees_controller.rb:2:in 
> `<class:EmployeesController>' 
> > <http://localhost:3000/employees#> 
> > app/controllers/employees_controller.rb:1:in `<top (required)>' 
> > <http://localhost:3000/employees#> 
> > On Friday, 3 February 2017 11:51:44 UTC+8, Chee Chong Hwa wrote: 
> > > HI Sergio 
> > > 
> > > What am I doing wrong ? 
> > > https://github.com/activescaffold/active_scaffold/wiki/API:-Column 
> > > 
> > > config.columns[:eno].description = "Employee #" 
> > > 
> > > TypeError in EmployeesController#index 
> > > no implicit conversion of Symbol into Integer 
> > > Extracted source (around line *#9*): 
> > > 
> > > 7 
> > > 8 
> > > 9 
> > > 10 
> > > 11 
> > > 12 
> > > 
> > >     list.sorting = {:ename => 'ASC'} 
> > >     config.columns[:eno].description = "Employee #" 
> > >     #columns[:phone].label = "Phone #" 
> > >     #columns[:phone].description = "(Format: ###-###-####)" 
> > >     #no implicit conversion of Symbol into Integer 
> > >     config.columns[:memo].options = { :autocomplete => "off", :size => 
> > >     10, :class => 'text-input'}> 
> > > Rails.root: C:/RubymineProjects/pms4mysql 
> > > Application Trace <http://localhost:3000/employees#> | Framework 
> Trace 
> > > <http://localhost:3000/employees#> | Full Trace 
> > > <http://localhost:3000/employees#> 
> > > 
> > > app/controllers/employees_controller.rb:9:in `[]' 
> > > <http://localhost:3000/employees#> 
> > > app/controllers/employees_controller.rb:9:in `block in 
> > > <class:EmployeesController>' <http://localhost:3000/employees#> 
> > > app/controllers/employees_controller.rb:2:in 
> > > `<class:EmployeesController>' <http://localhost:3000/employees#> 
> > > app/controllers/employees_controller.rb:1:in `<top (required)>' 
> > > <http://localhost:3000/employees#> 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to