El Tuesday 23 September 2008 19:34:26 bgallet escribió:
> I have not been able to have the field override work for me! I have
> searched in this group to no avail. I am pretty sure this is very
> dumb, however it does not work for me. I do not even find where the
> helpers are being loaded! My helper is not loaded, and that is the
> reason the field override does not work.
>
> Here is my code:
>
> controllers/admin/orders_controller
>
> class Admin::OrdersController < ApplicationController
> before_filter :authenticate_admin
> layout 'admin'
>
> active_scaffold :order do |config|
> config.list.columns =
> [:created_at, :ht_amount, :uploaded_at, :address, :user]
> end
> end
>
> helpers/admin/order_helper.rb
> module Admin
> module OrderHelper
> puts "HELPER LOADED"
> def uploaded_at_column(record)
> puts "uploaded_at"
> check_box_tag "uploaded_#{record.id}", "1", record.uploaded_at !=
> nil, :disabled => true
> end
>
> def user_column
> "USER"
> end
> end
> end
>
> both the user and the uploaded_at column are not overriden.
> Furthermore, my helper is not loaded. What am I doing wrong? Please
> help,
If your controller is orders_controller, your helper must be orders_helper
(module OrdersHelper)
Or you can to add in your controller:
helper 'admin/order'
--
Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---