similar to: link_to in controller

Displaying 20 results from an estimated 6000 matches similar to: "link_to in controller"

2005 Jul 06
4
undefined method `stringify_keys!'
I have a Model whose table name and primary key don''t follow Rails conventions. So I have used set_table_name() and set_primary_key() and can do the Record.find() method ok. My problem is that the Record.new(params[:id]) idiom in a controller complains: undefined method `stringify_keys!'' for "REAL_PKEY":String Is there something else I need to do?
2005 Jul 07
2
Rails equivalent to System.out.println?
Is there a way I can have print statements in Rails code that will go either to the WEBrick console (prefered) or to a log file?
2006 Mar 14
3
ActiveRecord row-by-row processing
I want to use ActiveRecord outside of Rails to do processing on large tables. I want to be able to process the rows as they are retrieved rather than having to store the results in an intermediate array. Any suggestions? Looks like I could hack the adapter to provide an accessor to the underlying DBI handle. Anything cleaner than that?
2007 May 11
1
[Somewhat OT] Integrating RSpec and RCov results in Gem''s RDoc
I have a Gem on which the testing is done with RSpec. I would like to include the results of RSpec and the RCov html files in the RDoc. The problem is that when I have RDoc include the files, it winds up escaping all the html. Is there a way to get HTML into RDoc unprocessed? Or is there some other way I can distribute the RSpec/RCov results with my Gem integrated with RDoc? I can include
2006 Jul 03
2
1.1.4: link_to with mixed case controller names "broken"?
I have a side navigation bar with links embedded in it like the following: <%= link_to( ''Create Job'', { :controller => ''eSimply'', :action => ''upload'' }) %> This link now shows a routing exception Recognition failed for "/eSimply/upload" This link has worked for over through Rails
2006 Jan 20
4
[newbie]how to use link_to to link to another controller?
I am just diving into Rails and I am a bit puzzled by the link_to function. am writing an app to display my photographs in categories. My application layout has a sidebar to show a menu with categories from the categories table in the database (like in taken from the tutorials), to be shown on every page. I managed to get a global @menu_categories object that keeps track of all the categories
2007 Sep 19
3
link_to method of different controller
I want to link to a method of a different controller. I thought I new how to do this but the code that I have is not working: <%= link_to ''Welcome Page'', { :action => ''index'', :controller => ''music_controller'' } %> Any ideas, thanks ~S -- Posted via http://www.ruby-forum.com/.
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"}
2006 Jun 09
5
Using link_to with an image tag & link text
Hi , I was trying to use link_to along with image_tag to setup a link that would open in an external window. But I was unable to make a link using both text & an image So my current workaround looks like this inside a partial where link is http://foo.com & text would be descriptive <img src="images/arrow.gif" border="0"/> <%= link_to(text, link, :popup
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
2006 Jun 04
3
link_to tool tips
I think they are called tool tips... I have view code that looks like this... <%= link_to ''I'', :action => ''edit_innoculations'', :id => personnel %> Is there an option (I don''t see it in api) to have tool tips for a link_to ? Craig
2006 Jan 22
6
Destructive behavior with link_to, button_to, :post=>true
Hello- I would like to know what the suggested practice is for having multiple submit buttons on a relatively complicated input page. Let''s use the example of a Contact. There is lots of info there, including name, address, phone number. There is also a list of "contact associations" which can be modified on the same page. Ideally, the user could have one
2007 Nov 14
3
absolute urls in url_for vs. link_to
In both url_for and link_to, the :only_path param can be used to determine whether the link url used is complete with hostname and path, or just has the path (a kind of relative url). However, in url_for it defaults to false (urls with hostnames), and in link_to it defaults to true ( urls without hostnames, just paths). Is there any reason for this discrepency? To me, it violates the principle
2006 Jan 08
4
scaffold uses link_to for destroy
Hi, I wonder why scaffolding uses a link_to tag for the destroy links. Seems like these should be POST requests with button_to. The Rails book dedicates pages 335-337 to this very issue. Peter
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 Sep 04
2
how to? link_to with a rel="tag"
i want my html output to look like this: <a href="/path/to/page/" rel="tag">link text</a> how do i tell the link_to method that i need: rel="tag"? thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send
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/.
2007 Dec 06
2
passing parameters through link_to
Is it possible to pass parameters through link_to that will be used by the controller that link_to directs to? Specifically I have this code: <% for user in @users -%> <%= link_to user.screen_name, {:action => "index", :controller => "users", :user_id => user.id } %> <% end %> Is it possible to use the parameter at the end of link_to(:user_id
2006 May 26
2
link_to and fragment identifiers
Fragment identifiers, it took me 30 minutes just to figure out what they are called. I would like to be able to create url that looks like this: post/view/id#comments How do I do that with a link_to function? link_to "Comments", :controller => "post", :action => "view", :id => post.id ??? Thanks guys! :-) John Kopanas http://www.kopanas.com
2006 Jan 25
3
Link_to within :flash
Is there any way to use a link_to method within a controller through a :flash notice? If a user enters an incorrect username/password, I want to have a link to a forgotten password form readily available. My newbie attempt at doing this resulted in the following error: undefined method `link_to'' for #<UserController:0x386aef8> I suppose I could easily have a normal link, was