yes that works On Apr 2, 4:30 pm, Domizio Demichelis <[email protected]> wrote: > I checked the filter-menu tag, and it was implemented for the old > i18n-rails, so I refactoried it a bit, also adding an exception in case of > bad "options" passed/found, that should help debugging an app. > > Before I commit the change, please, could you try add the following tag > definition to your application.dryml and tell me whether it works with your > legacy app? > > <def tag="filter-menu" attrs="model, param-name, options, no-filter, id, > first-value"> > <% options = > t("activerecord.attributes.#{model}.filter_menu.#{param_name}.options", > :default=>[:"tags.filter_menu.#{param_name}.options", options]) > raise ArgumentError, %(You must provide an "options" attribute, or set > "activerecord.attributes.#{model}.filter_menu.#{param_name}.options" or > "tags.filter_menu.#{param_name}.options" to an Array or to an Array of > Arrays > in your locale file(s)) unless options.is_a?(Array) > no_filter = > t("activerecord.attributes.#{model}.filter_menu.#{param_name}.no_filter", > :default=>[:"tags.filter_menu.#{param_name}.no_filter", > :"tags.filter_menu.default.no_filter", no_filter, "All"]) %> > <form action="&request.fullpath" method="get" class="filter-menu" > merge-attrs="id"> > <div> > <% opt = options.first.kind_of?(Array) ? options.*.last : options > selected = opt.detect {|o| o.to_s==params[param_name.gsub('-', > '_')] } %> > <select-menu name="¶m_name" options="&options" > selected="&selected" > first-option="&no_filter" first-value="&first_value" > key="¶m_name" merge-params/> > </div> > </form> > </def> > > On Sat, Apr 2, 2011 at 10:57 AM, Domizio Demichelis <[email protected]>wrote: > > > > > > > If you don't pass any "options" attribute to the filter-menu tag, it calls > > the rails t helper in order to find the options in > > en.activerecord.attributes.filter_menu.#{param_name}.options then it > > fallbacks to tags.filter_menu.#{param_name}.options. If nothing is found > > the helper returns a "[ MISSING...]" string. You should pass an explicit > > options argument or set the matrix value of one of the above keys (matrix = > > an array of arrays). If you did one of those and you still have the error, > > it might be a bug in the filter-menu tag. > > > In that case, please create a new bare app, and add just the filter menu > > that reproduces the error, then upload it here or better, open a ticket in > > lighthouse, so I will fix it right away. > > > Thank you > > dd > > > On Sat, Apr 2, 2011 at 10:06 AM, dev curmudgeon <[email protected]>wrote: > > >> is there a guide to the necessary steps for converting a hobo 1.0 app to > >> 1.3? > > >> so far i'm thinking that the simplest route could be > > >> 1) generate a vanilla 1.3 app using the wizard, answering the questions to > >> get the right invite/settings etc > >> 2) copy over all of the 1.0.x model and controller files from the > >> production app > >> 3) run the migration generator > >> 4) at this point in theory the schema is equivalent to production, so i > >> should be able to switch in a snapshot db > >> 5) check the vanilla views for all of the tables, to confirm that the new > >> app can access the current data > >> 6) copy over the production views > >> 7) test and fix functionality > >> 8) migrate theme/stylesheet/css > > >> in trying the above, so far i've found > >> - paperclip is not playing nicely, so i've backed out the model/controller > >> that uses it > >> - everything else *seems* to be ok up to step 5) > >> - i'm stuck at 6), probably due to the i18n changes - > >> undefined method `detect' for "[MISSING: > >> en.activerecord.attributes.filter_menu.user.options]":String > > >> any thoughts? > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Hobo Users" 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/hobousers?hl=en.
-- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
