Hi Sergio
Controller code :
class TasksController < ApplicationController
active_scaffold :"task" do |conf|
conf.label = "Tasks"
conf.columns = [:task,:date,:rootcause,:priority,:suggestion,
:action,:completed, :version,:date_completed ]
conf.columns[:rootcause].form_ui = :record_select
conf.columns[:action].options = { :cols => 160, :rows => 6 }
conf.columns[:suggestion].options = { :cols => 160, :rows => 6 }
# 3/3/17
conf.columns[:priority].form_ui = :record_select
# 3/3/17
list.sorting = {:task => 'ASC'}
* list.per_page=5*
#sergio conf.create.link.ignore_method = :controller_method
# 10/3/17 - based on security level
conf.create.link.ignore_method = :hide_create_link
# disable need to remove export conf.export.link.ignore_method =
:can_show_export_link
# to hide certain fields
# list.columns.exclude :priorities
# show.columns.exclude :priorities
# create.columns.exclude :priorities
# update.columns.exclude :priorities
#26/2/17, search by fields
conf.actions.exclude :search
conf.actions << :field_search
conf.field_search.columns = :task,:completed,:date_completed,:date,
:rootcause,:priority
# 26/2/17, search by fields
# 14/3/17
conf.actions << :duplicate
conf.duplicate.link.method = :get
conf.duplicate.link.position = :after
conf.duplicate.link.page = true # for new page rendering
# 14/3/17
# 26/2/17 add export capability
conf.actions.add :export
# you can filter or sort columns if you want
conf.export.columns = %w(date task completed date_completed version
priority rootcause)
# you can define a default values for the exporting form
#conf.export.default_deselected_columns = %w(phone address)
conf.export.default_delimiter = ";"
conf.export.force_quotes = "true"
#conf.export.default_file_format = 'csv' # or 'xlsx'
# 26/2/17 add export capability
# 12/3/17
conf.field_search.action_group = 'collection.menu'
conf.create.action_group = 'collection.menu'
conf.export.action_group = 'collection.menu'
# 12/3/17
end
On Tuesday, 4 April 2017 17:57:20 UTC+8, Sergio Cambra wrote:
>
> El martes, 4 de abril de 2017 0:48:37 (CEST) CCH escribió:
> > Hi Sergio
> >
> > I use the master branch as I am using Rails 5.02 at the moment.
> > Recently, I noticed that list.per_page=5 is no longer honoured as the
> page
> > shows 10 lines.
> >
> > Can you please check on this ?
>
> Hi
>
> I have checked and it works here. Can you share your controller code?
>
--
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.