helpers
Testing view helpers
I\'m currently working on a Rails plugin used for generating iPhone specific HTML meta-tags. I\'m trying to use ActionView::TestCase for unit tests but keep getting the same error. See file contents a[详细]
2023-01-12 21:45 分类:问答cakephp accessing view attributes/variables from within a helper
is there a reasonable way to access the view attribute \"passedArgs\" (or any similar) /* view */ $this->passedArgs[详细]
2023-01-12 02:37 分类:问答Are helpers really faster than partials? What about string building?
I\'ve got a fancy-schmancy \"worksheet\" style view in a Rails app that is taking way too long to load. (In dev mode, and yes I know there\'s no caching there, \"Completed in 57893ms (View: 54975, DB:[详细]
2023-01-11 00:44 分类:问答How can I return javascript from a Ruby on Rails helper method?
I have a Note model, which can contain have either an image link attachment (linktype = \"image\" or some text (linktype = \"text). When I display the notes, the method of display changes de开发者_如何[详细]
2023-01-08 22:29 分类:问答Code shared by multiple controllers and models -- where is the best place to keep it?
So this is a newbie rails design question. Lets say I want some of my common functionality to be sitting in a set of helper classes (either as class methods or instanc开发者_如何学JAVAe methods).[详细]
2023-01-07 18:32 分类:问答How can I modify the input type of the Rails datetime_select helper?
I am using the Rails helper datetime_select in one of my forms.I currently have a requirement to change the dropdowns f开发者_开发问答or day, year, hour, and minute to be textboxes with validation.Is[详细]
2023-01-07 12:43 分类:问答Can I use option_groups_from_collection_for_select with include_blank on rails?
I want use on my rails helper a script as follow: select_tag(:article_id, option_groups_from_collection_for_select( @article, :categories, :name, :id, :name, :include_blank => \"Select one categor[详细]
2023-01-05 11:11 分类:问答How can I have a single helper work on different models passed to it?
I am probably going to need to refactor in two steps since I\'m still developing the project and learning the use-cases as I go along since it is to scratch my own itch.I have three models:Letters, Ca[详细]
2022-12-29 08:10 分类:问答'button_to' gives me an ugly URL!
Im trying to get an \'add to cart\' button to work.When I use <%= button_to \"Add to Cart\", :acton => \"add_to_cart\", :id => @product %> and then click the button, I get a URL that puts[详细]
2022-12-28 04:53 分类:问答How do I insert an input's value into a separate form?
I\'m making a tool for my university that allows students to create a list of classes by doing the following:[详细]
2022-12-27 05:17 分类:问答