thanks guys it works very well On 18 fév, 19:22, Benjamín Cárdenas Salamandra <[email protected]> wrote: > Hola, > in vendor\plugins\active_scaffold_localize\liblocalization.rb i add this line > in 16 row: > string_to_localize = string_to_localize.is_a?(Symbol) ? > string_to_localize.to_s.capitalize : string_to_localize > Benjamin > fmh escribió:hello, kenny your solution about helper work fine sergio I > updated my AS rails 2.2 and i have this error undefined method `include?' for > :create_new:Symbol Extracted source (around line #8): 5: <% next if > controller.respond_to? link.security_method and ! > controller.send(link.security_method) -%> 6: <% next if link.action == 'new' > && params[:nested].nil? && active_scaffold_config.list.always_show_create %> > 7: <% next if link.action == 'show_search' && > active_scaffold_config.list.always_show_search %> 8: <%= > render_action_link(link, new_params) -%> 9: <% end -%> 10: 11: <%= > loading_indicator_tag(:action => :table) %> On 18 fév, 16:20, "Sergio Cambra > .:: entreCables - Symbol Servicios Informáticos S.L. > ::."<[email protected]>wrote:El Wednesday 18 February 2009 14:30:02 fmh > escribió:yet the search overrides not work, the method has no effect and when > i look my log : created_at = today or a value of selectboxdef > self.condition_for_created_at_column(column, value, like_pattern) case > value when 'today' ["created_at <= ?" , Date.today] end > endSorry, I was missed. condition methods were only for search_ui or column > type, and must be defined in module ActiveScaffold::Finder. Your column don't > have a search_ui, so it will try to use condition_for_datetime_column. I have > fixed it (in master and rails-2.2 branches), and now you can override those > methods in your controller, also you can add condition methods for specific > columns. Now the methods are condition_for_#{search_ui}_type, such as: > condition_for_integer_type condition_for_decimal_type condition_for_date_type > condition_for_datetime_type and I have added support for > condition_for_#{column_name}_column methods.On 18 fév, 13:36, > fmh<[email protected]>wrote:it work with thisDATE_RANGE = > [["Today","today"],["Yesterday", "yesterday"], ["This Week", > "this_week"]]def created_at_form_column(record, input_name) > select_tag("#{record}[created_at]", options_for_select(DATE_RANGE, > record.created_at), :name => input_name)endOn 18 fév, 13:24, > fmh<[email protected]>wrote:in my helperdef > created_at_form_column(record, input_name) select :record, :created_at, > options_for_select(['Today', 'Yesterday','This Week']), {:include_blank > => as_('- select -')}, :name => input_name endI make like that because > created_at_search_column return a empty selectboxNow the content of my > selectbox is<option value="Today">Today</option> <option > value="Yesterday">Yesterday</option> <option value="This Week">This > Week</option>i check the html code :<option value="<option > value="Today">Today</option>"><option value="Today">Today</option> </option> > <option value="<option value="Yesterday">Yesterday</option>"><option > value="Yesterday">Yesterday</option> </option> <option value="<option > value="This Week">This Week</option>"><option value="This Week">This > Week</option></option>it's strangeOn 18 fév, 12:01, "Sergio Cambra .:: > entreCables - Symbol ServiciosInformáticos S.L. > ::."<[email protected]>wrote:El Wednesday 18 February 2009 03:25:28 fmh > escribió:hello,i try to use a field_search with a datetime record but it does > not work.config.actions.swap :search, :field_search > config.field_search.columns = :created_athow to use date range like "Today" > or "this week" ?Default search form for date fields is searching dates in a > range. You can add a new search_ui in your helper and conditions method in > your controller Or you can override the search form for a specific > column.http://wiki.github.com/activescaffold/active_scaffold/search-o > verrides-- Sergio Cambra .:: entreCables 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]... > > plus de détails » --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
