link-to
Can I use a link_to to generate a link with a span inside?
I am basically trying to get 开发者_如何学运维this result: <a href=\"#\" class=\"button small-button green-button\">[详细]
2023-02-07 04:40 分类:问答Create without form
I\'m trying to create an object without a form, but just clicking on a link: <%=link_to \"Add as friend\", user_friend_path(current_user,u), :method=>:post %>[详细]
2023-02-06 09:26 分类:问答link_to update (without form)
I want a link to update a resource, without using an HTML form. Routes: resources :users do resources :friends[详细]
2023-02-06 08:10 分类:问答How do I add a span in a link_to with an image
So I have this: <%= link_to(image_tag(@model.picture.url(:thumb), :alt => \'\'), \"/pages/you/#{something.id}\", {:id => \"y_link_#{something.id}\"}) %>[详细]
2023-02-04 12:29 分类:问答Button_to in Ruby on Rails bad route
I\'m trying to use the button_to rails helper. I wrote the following code: <%= button_to \'Edit Item\', edit_item_path(@item), :class => \'mark-button\' %>[详细]
2023-02-04 08:17 分类:问答How do I add HTML options after link has been generated with link_to?
I\'m generating a bunch of links in a menu bar on my app. When the user is viewing one of the pages of the menu bar I\'d like the style to change to show that they are viewing the present page. It\'s[详细]
2023-01-31 11:39 分类:问答Problems with link to eval()in RoR
What am I doing wrong here? This seems to work fine earlier in my code: -@images.each do |img| -link_to eval(params[:action] + \'_image_path(img)\') do[详细]
2023-01-30 05:00 分类:问答Partial form in rails 3 needing different link depending on New or Edit
I have a basic setup of views that was generated by the Rails 3 scaffolding.It gives me a partial view _form.html.erb.Both my edit.html.erb and my new.html.erb render this partial view.[详细]
2023-01-29 05:26 分类:问答How to use link_to to pass value back to a search field and execute in RAILS, RoR?
I have a search field and button. When the user searches something like \"开发者_如何学JAVAcat\" my view renders a bunch of related keywords such as \"catnip\", \"cat toys\", \"cats\" etc... each of t[详细]
2023-01-27 19:26 分类:问答link_to with jquery params in rails
I want to make an in-place search in my rails app. I used button_to_remote with prototype, but now I\'m using JQuery, so I changed to link_to.[详细]
2023-01-27 09:23 分类:问答