From atapiador at dit.upm.es Mon Sep 1 02:53:49 2008 From: atapiador at dit.upm.es (Antonio Tapiador del Dujo) Date: Mon, 1 Sep 2008 08:53:49 +0200 Subject: [Cmsplugin-users] Update on can't run plugin_migration In-Reply-To: <48B8622A.4040301@gmail.com> References: <48B8622A.4040301@gmail.com> Message-ID: <200809010853.51286.atapiador@dit.upm.es> The Engines plugin is necessary! Did you finish its instalation? (vendor/plugins/engines/README) El Friday 29 August 2008 22:55:06 Burt Adsit escribi?: > I pulled out the 'engines' plugin and get this: > >script/generate plugin_migration > > C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routi >ng/builder.rb:197:in `build': Illegal route: the :controller must be > specified! (ArgumentError) from > C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routi >ng/route_set.rb:261:in `add_route' > from > C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routi >ng/route_set.rb:269:in `add_named_route' > from > C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routi >ng/route_set.rb:55:in `method_missing' > from C:/Users/burtadsit/Documents/Aptana > Studio/topics/config/routes.rb:2 > from > C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routi >ng/route_set.rb:207:in `draw' > from C:/Users/burtadsit/Documents/Aptana > Studio/topics/config/routes.rb:1 > from > C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/depen >dencies.rb:502:in `load' > from > C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/depen >dencies.rb:502:in `load' > ... 12 levels... > from > C:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/generate.rb:1 > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from script/generate:3 From david.tapiador at gnoxys.net Thu Sep 4 05:05:08 2008 From: david.tapiador at gnoxys.net (David Tapiador del Dujo) Date: Thu, 4 Sep 2008 09:05:08 +0000 Subject: [Cmsplugin-users] hello and question about sortable_list Message-ID: <200809040905.08398.david.tapiador@gnoxys.net> First at all, hello! that is my first email! :D I just use the last version of cms_plugin for a managment aplication in a Rails 2.1.0. environment My question is a about sortable_list and if it is possible to arrange in it differents field more dinamically... I mean... i have to views that need a sortable list about the model MacrosAction. One, is the own list in index action, but other go inside of an other show action that belongs to the Macro model, those has_many: macros_actions. The second list should render differents fields than the first. For example, i'm not interested in know who is the macro owner of this macro_action in the second case, but yes in one. Maybe one choice is to create a new option in sortable_list in which you can set which act_as_sortable list are you chosing, por example: # class MacrosAction < ActiveRecord::Base acts_as_sortable :columns => [ { :name => "My MacroAction Name", :content => proc { |helper, macros_action| macros_action.name }}, :created_at ], :list_name => "index" acts_as_sortable :columns => [ { :name => "My *Macro* Name", :content => proc { |helper, macros_action| macros_action.macro.name }}, :created_at ], :list_name => "inside_macro" end Then, in view, it can be rendered as: # <%= sortable_list @macros_actions, MacroAction, :append => "&q=#{ params[:q]}", :list => "index"%> or just in second context. # <%= sortable_list @macros_actions, MacroAction, :append => "&q=#{ params[:q]}", :list => "inside_macro" %> It is only a suggestion, maybe it can be done by other way... Ciao! -- David Tapiador del Dujo ----------------------------------------------- Gnoxys, Desarrollo y Sistemas de Software Libre Tlf. Movil: 653 92 53 38 david.tapiador at gnoxys.net http://www.gnoxys.net ----------------------------------------------- From atapiador at dit.upm.es Fri Sep 5 02:50:03 2008 From: atapiador at dit.upm.es (Antonio Tapiador del Dujo) Date: Fri, 5 Sep 2008 08:50:03 +0200 Subject: [Cmsplugin-users] hello and question about sortable_list In-Reply-To: <200809040905.08398.david.tapiador@gnoxys.net> References: <200809040905.08398.david.tapiador@gnoxys.net> Message-ID: <200809050850.04245.atapiador@dit.upm.es> El Thursday 04 September 2008 11:05:08 David Tapiador del Dujo escribi?: > First at all, hello! that is my first email! :D Hi David! Welcome to the list! > I just use the last version of cms_plugin for a managment aplication in a > Rails 2.1.0. environment > > My question is a about sortable_list and if it is possible to arrange in it > differents field more dinamically... > > I mean... i have to views that need a sortable list about the model > MacrosAction. One, is the own list in index action, but other go inside of > an other show action that belongs to the Macro model, those has_many: > macros_actions. > > The second list should render differents fields than the first. For > example, i'm not interested in know who is the macro owner of this > macro_action in the second case, but yes in one. > > Maybe one choice is to create a new option in sortable_list in which you > can set which act_as_sortable list are you chosing, por example: > > # > class MacrosAction < ActiveRecord::Base > > acts_as_sortable :columns => [ { :name => "My MacroAction Name", > > :content => proc { |helper, > : macros_action| > > macros_action.name }}, > > :created_at ], > : > :list_name => "index" > > acts_as_sortable :columns => [ { :name => "My *Macro* Name", > > :content => proc { |helper, > : macros_action| > > macros_action.macro.name }}, > > :created_at ], > : > :list_name => "inside_macro" > > end > > Then, in view, it can be rendered as: > > # > <%= sortable_list @macros_actions, MacroAction, :append => "&q=#{ > params[:q]}", :list => "index"%> > > or just in second context. > > # > <%= sortable_list @macros_actions, MacroAction, :append => "&q=#{ > params[:q]}", :list => "inside_macro" %> > > > It is only a suggestion, maybe it can be done by other way... What about defining all the columns you need in the Model, and choosing which ones you'll display in the Helper, using their :id? Example: class MacrosAction < ActiveRecord::Base acts_as_sortable :columns => [ { :id => :macro_action_name, :name => "My MacroAction Name", :content => proc { |helper, macros_action| macros_action.name }}, { :id => :macro_name, :name => "My *Macro* Name", :content => proc { |helper, macros_action| macros_action.macro.name }}, { :id => :created_at, :content => :created_at } end Index: <%= sortable_list @macros_actions, MacroAction, :append => "&q=#{params[:q]}", :columns => [ :macro_action_name, :created_at ] %> Show: <%= sortable_list @macros_actions, MacroAction, :append => "&q=#{params[:q]}", :columns => [ :macro_action, :created_at ] %> From atapiador at dit.upm.es Fri Sep 5 04:45:45 2008 From: atapiador at dit.upm.es (Antonio Tapiador del Dujo) Date: Fri, 5 Sep 2008 10:45:45 +0200 Subject: [Cmsplugin-users] Post to Entry Message-ID: <200809051045.47437.atapiador@dit.upm.es> Hi, I've made a big change in the plugin, changing Post to Entry. You should change Post to Entry if you have written code. Cheers.