Displaying 20 results from an estimated 5000 matches similar to: "Thoughts on Second-Tier Documentation"
2005 Jul 16
2
Applying css style to a link_to
What is the proper syntax to apply a css class to a link created using
link_to?
I''ve tried
<%= link_to("details", :class => "details", :action => "edit", :id => event)
%>
but that creates a link which looks like
/admin/events/edit/3?class=details
which is not what I''m looking for.
Kyle Heon
2006 Jan 03
7
link_to an external url ?
Simple question. Is it possible to generate a link like
<a href="http://www.google.com" target="_blank" >google</a>
with the link_to function ?
Thanks
2009 Jun 11
4
Using view helpers and route helpers in a model
Hi there,
I am trying to get something working and its driving me crazy. I have
been looking around for solutions to getting view helpers working in
models and for the most part I find this solution.
Add the following in the model you want to use them in
include ActionView::Helpers::UrlHelper
include ActionController::UrlWriter
However, when I try something like
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here:
http://wiki.developers.facebook.com/index.php/Facebook_Styles
I included testing and comments. I hope you find it useful.
Curiously, it''s really a small extension of FBML.
Richard
-------------- next part --------------
Index: test/rails_integration_test.rb
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
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
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 23
4
an image that is a clickable link?
Hi,
How do I make an image that is a clickable link the rails way? Is
there a view helper for this?
Thanks,
Peter
2005 Dec 15
6
passing parameters to link_to OR better way to do this?
Hi All:
I''m writing my 1st Rails app and I can''t seem to find the answer on
the web or in the book.
I''m making a table, and I want to be able to expand a filename. The
code is basically as as follows below. In the last <td> entry, I want
to call an action and pass in the test_results_path, which I will go
and read a file and munge the data for a separate
2006 Feb 12
5
Passing Multiple Values In URL
Been a while since I programmed in Ruby and Rails and some of the
basic concepts I just loose so quickly. This one I can''t find any
examples of.
I want to pass two pieces of information in my URL. The :id plus I
want to pass my user_id. How do I pass it using the link_to?
Stupid question I know... but I can''t find the answer.
John Kopanas
http://www.kopanas.com
2006 Jan 12
6
link_to_image - Remove Border
Hi All,
I am new to both Ruby and Rails, so please be patient with me. I am
currently working on a view for a controller and I have used the
following excerpt:
<td><%= link_to_image "b_edit", :action => ''edit'', :id => part_prefix
%></td>
The image is being displayed and the link is working. However, the
formatting of image rendered
2006 Jan 18
5
redirect_to with an anchor, how ?
Hello,
I try this :
redirect_to :action => ''infos'' , :id => params[:id] , :show => "comments#a"
i want this : .../infos/15?show=comments#a
but I have this : .../infos/15?show=comments%23a
Someone could tell me how generate an anchor link ?
Thanks
2012 Feb 12
3
Rails routes - destroy
Can''t figure out how duplicate routes are differentiated by rails ...
Read routing from inside out and API as well as a few tutorials but
still don''t get it!!! For example...
routes.rb
resources :minisections do
resources :questions
end
rake routes:
minisection_question GET
/minisections/:minisection_id/questions/:id(.:format)
questions#show
2006 May 11
3
How do i open link to a new winow?
Pretty simple question right? can''t seem to figure it out.
--
Posted via http://www.ruby-forum.com/.
2006 Jan 16
2
ruby embedded code replacement for onclick in link?
Is there a ruby embedded code replacement for something like this?
<a href="#" onclick="window.open(''http://192.168.78.12:3000/portfolio/show/<%=
item.id %>'', ''test'', ''width=660, height=500,resizable=no'')">
<%= image_tag item.image_url, :size => ''200x150'' %></a>
Thanks,
Dan
2006 Jan 11
5
stack level too deep problem
Hi all, I''m trying to overload the link_to function, (to disable link_to if
the user has no access right)
this is my code, it work the first time I run the application, the second
time I refresh the page I always get "stack level too deep error"
module UsersHelper
include ActionView::Helpers::UrlHelper
alias_method :link_to_original, :link_to
def permission?
true
2006 May 23
3
image_tag problem
Hiall,
I want to make an image_tag from within a controller in order to be
able to present a link (with a status image) in a view. Here is my
controller method (in file webca_controller.rb, hence WebcaController)
def untouched_status_image_tag
image_tag("open", { :alt => "Offen", :title => "Offen", :size =>
"12x12", :class =>
2008 Feb 20
1
link_to weirdness, related to namespace?
Hi,
In my app/views/admin/clieint/_searchresults.rhtml partial, I have ...
<% for user in @users %>
<tr>
<td><%=h user.ship_to_first_name %></td>
<td><%=h user.ship_to_last_name %></td>
<td><%=h user.email %></td>
<td align="center"><%= link_to ''Show'', {:action =>
2008 May 11
3
Get current controller name/action name from view
Hi.
I swear I found this in the group archives, but now I cannot find this
in the group or elsewhere online!
In a view I would like to get the current controller name and action
that was used to get here.
For example, I have a template that I''m using from two different
controllers (and four different actions in each controller), such
as :controller => "my_view", :action
2006 Apr 06
5
Using helper method of another model
I have a template that belongs to a certain model (model A). I need to
call a helper method of a different model (model B). Then I need the
helper method of B to call a helper method of model C.
I tried using "include" and "require" and using namespaces, but I got
"undefined method". What is the way to do it?
--
Posted via http://www.ruby-forum.com/.