similar to: Including dynamic list of params in link_to

Displaying 20 results from an estimated 5000 matches similar to: "Including dynamic list of params in link_to"

2006 Mar 13
5
Displaying related entries by tags - HELP!
Ok, my site is setup like pretty much every other blog out there. A list of the most recent 5 posts, then by clicking one, you go to an individual post page, displaying the full context of that post. Now, what I would like to do is to display the related entries in the side column, which is part of the layout, based on the tags belonging to that specific entry. Here''s my coding so
2006 May 02
6
Is there a link_to ''external url''?
I''ve checked the Rails documentation but find no mention of link_to ''external url'' or equivalent. Does rails have a built in method to do this? thanks -Lindsay -- Posted via http://www.ruby-forum.com/.
2006 Mar 17
2
Security issue dealing with comment posting - anyone?
This is how I''m posting comments currently. This works, but I read somewhere that I shouldn''t inject params right into my sql query, because it makes it easy for people to hack in and ruin the db. I''m not sure if this even makes sense, but I''ve tried other things, and can''t get anything else to work. #currently def comments content =
2008 Jul 09
2
build matrix with the content of one column of a data frame in function of two factors
Hello, First, thanks for your help (and sorry for my english !) I have a data frame in which each row represents a vote (in percent, only 20,40, 60,80,100) of one person on one content, with three columns : name (the name of the voters), content_id, vote : str(votesredac) 'data.frame': 1000 obs. of 3 variables: $ name : chr "Guillemette Faure" "Guillemette
2010 Apr 13
5
params[hash] and link_to.... easy question... but I am stupid :)
routes.rb map.connect '':controller/:action/:id/:draw_id'', :controller => "admin", :action => "edit_position" In a view I have: <%= link_to "#{@draw.positions[0].team}", { :controller => :admin, :action => :edit_position, :id =>@draw.positions[0].id, :draw_id =>
2006 Apr 03
2
Order By Number of Comments
Hi, I am new to Ruby on Rails, so I apologise if this has been answered elsewhere. I have had a look through the list but I can''t seem to find what I am trying to do. I have implemented the standard blog and comments app from the screencast. However I am trying to extend the functionality. I want to be able to display a list of posts and order them by the total number of comments
2012 Feb 17
1
link_to param body
Hi everybody, I''m developing an application, in this application I have a link that redirects me to other page. The problem is: -I want to add some params to this url, but I wanna hide this params "Like post request"(on the request body). How should I do it? <%= link_to "New Post", new_post_path %> -- Bruno Meira -- You received this message because you are
2006 Apr 20
4
ActiveRecord: Many-to-Many problem
I am trying to make many-to-may relationship on classes Section and Content. Both Content and Section has: has_and_belongs_to_many :contents and has_and_belongs_to_many :sections and I have an exception when trying to access model properties: "undefined method `add_contents'' for #<Section:0xb745c514>" def add_content_entry @section = Section.find(params[:section_id])
2006 Mar 17
1
How to handle errors - HELP
I''m having trouble with my Ajax comments, but only when someone clicks the submit button when there''s no comment. How can I handle this in my code? Do I use "rescue nil" or something? Here''s my controller: def comments content = Content.find(params[:id]) @comment = Comment.new(params[:comment]) content.comments << @comment
2006 Apr 14
1
Script.aculo.us Effects with callbacks not working as it should.
Hello all! I''m having a problem which is driving me insane. It''s probably related to the fact that I''m new to javascript.... :) Here''s the thing, I have a couple of effects which are all being put in the queue. Some of these effects have callbacks; e.g. "afterFinish". But the calback is being made directly instead of after the effect is done. The
2006 May 11
3
can''t call link_to from within a model class
can anyone tell me how to call link_to from within a model class? I''m trying to do something like the following: validates_uniqueness_of :email, :message => "address has already been taken. If you''ve forgotten your password, please click " + link_to(''here'', :action => ''forgot_password'', :controller =>
2008 Oct 17
1
link_to + image_tag
i want to integrated link_to with image_tag before i did link_to with image_tag like this <%=link_to image_tag(image.filename
2006 May 24
1
link_to CSS problem
Hi all, I''m a Ruby/Rails/web development newbie, so this may be a stupid question. I''m putting some links using link_to into my rhtml page, creating the layout using the DIV tag: <div id="description"> <%= link_to h (item.description), :action => ''show'', :id => item.id %> </div> ... div#description { float: left;
2006 Jun 07
2
Hash flattening on paginator link_to
Hey I need some help with pagination and the link_to in the view. I''m trying to include a hash in the pagination link_to params and it keeps flattening out my hash. Example: Here''s my hash called @answer: "answer"=>{"6"=>"9bf31c7ff062936a96d3c8bd1f8f2ff3", "7"=>"6f4922f45568161a8cdf4ad2299f6d23"}
2008 Jan 03
3
how to use "link_to" to deliver a parameter?
Hello, there: I wish A link to invoke such a action together with the parameter "zh_CN" "cookies/switch_language/zh_CH" to switch language sellection, and I use the following code: <%= link_to ''Chinese'', :controller => ''cookies'', :action => ''switch_lang'' %> But, how is "link_to" able to convey
2011 Jan 06
2
Link_to parameters
Hello, I would like to have a link_to automatically populate a field in the form that it is linking to. For example (excuse my silly words, im trying to make a point) <%= link_to "Add a COOL Post", new_post_path, :howcoolisit => ''COOL'' %> <%= link_to "Add a NOTCOOL Post", new_post_path, :howcoolisit => ''NOTCOOL'' %> Then,
2006 Jul 13
3
strange behavior with link_to for "blog" and "gallery"
Okay, what''s so different about the bellow code? When I use the link_to function in a partial (three times passing "Stats", "Blog", and "Gallery")... <%= link_to(menuItem.to_s, :controller=>menuItem.to_s.downcase)%> I get... <a href="/stats">Stats</a> <a href="/blog">Blog</a> <a
2006 Apr 20
0
link_to mapped urls
Hi all, I want my link_to links direct to my mapped urls, not the long ones with controllers and actions in them. What I have: in view: <%= link_to "random url", random_url %> routes.rb: map.random ''random'', :controller => ''start'', :action => ''random'' link_to results in "http://localhost:3001/start/random"
2006 Jan 22
0
link_to query string
Here''s a simple one I think. Using link_to, how do you get multiple fields in the query string? link_to("anchor text", {:action=>"neat_page", :field_1=>"value 1", :field_2=>"value 2"}) -this only gets you field_1 in the query string as does this - link_to("anchor text", :action=>"neat_page",
2005 Oct 15
0
Making link_to use the routes I define
Hi, In my rails application I have a controller (message) that handles all top-level directory requests, and maps it to a list view. How can I use link_to to link to the URLs generated by this route? map.connect '':forum_url_name/'', :controller => ''messages'', :action => ''list'' Then I have a (forum) controller that lists all its