helpermethods
Recursive function in helper method scoping issues
Ok so I\'m playing around with a nested comments system on rails using Awesome nested set. I\'m currently implementing a recursive function to get the nesting working (I know for performance this is t[详细]
2023-04-06 03:00 分类:问答Render partial from helper_method
Ok so I have a help开发者_高级运维er method in the application controller: def run_test(test_name)[详细]
2023-04-01 22:29 分类:问答output of the rails select_tag
i\'m new to rails and am having difficulty figuring out how to use the output of a select form in rails 3. the following is my select tag:[详细]
2023-03-14 11:41 分类:问答sharing private methods across controllers
Hey guys, I have two controllers, X and Y: In X, I have a :before_filter for a private method, foo. I also have the following statement at the top of controller X.[详细]
2023-03-10 07:19 分类:问答Problem with escaping HTML characters in Rails 3
I use foo helper function in my view: <%= foo [\"hello\", \"stack\", \"overflow\"] %> When foo is defined like this:[详细]
2023-03-04 07:33 分类:问答How do I work with Rails 3 cookies and helpers?
I created a user and stored the id in a permanent cookie: def save_user_id_cookie cookies.pe开发者_开发问答rmanent.signed[:user_id] = @user_id[详细]
2023-02-28 02:37 分类:问答Including Custom Helper Method in Ruby Gem
I\'ve been attempting to add a helper method to my ruby gem for use with Rails 3. Here is an example of what I am attempting to achieve:[详细]
2023-02-15 09:12 分类:问答Rails keeps changing my string "?" into "%3F"
Basicaly I just want to insert this + \"?direction=desc\" in helper method. But once it parses it comes out like this..[详细]
2023-02-03 21:43 分类:问答How do I write methods that insert rspec examples?
In a bunch of rspec rails unit specifications I do something like: describe Foo do [:bar, :baz].each do |a|[详细]
2023-01-21 01:19 分类:问答Where do I put helper methods for ActionMailer views?
I have a method that takes an array of strings and joins them so they do something like this: >> my_arr[详细]
2023-01-15 07:31 分类:问答