Post Meta

Bookmarks

  • Delicious
  • Digg
  • Reddit
  • Magnolia
  • Newsvine
  • Furl
  • Facebook
  • Technorati

As you know, Rails thinks you are following some conventions: predefined naming of database tables and columns.

One of them is “name”. In ActiveScaffold this column has such an importance like in normal Rails apps the “id” column.

For example, in table relationships AS is always displays the associated record by “name”. In the User/Roles relationship the “roles” column will always display automatically the “role.name”.

1
2
3
4
 
config.list.columns = [:login, :email, :roles, :accepted_roles]
 
config.columns[:roles].ui_type = :select


Related posts

Leave A Comment

+ -