Displaying 20 results from an estimated 8000 matches similar to: "link_to problem"
2006 Aug 02
4
Struts
I have a STRUTS based webapp and I want to port it to RUBY/RAILS...
Can anyone suggest a migration strategy...I would like to migrate my struts
actions over time if possible.
Jim
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
2005 Aug 15
2
Newbie rendering problem
Hi
On every list request i render an item partial through a collection of
items. the item table has 3 columns namely name,anotherName and id. the
item partial looks like
<%@item=item%>
<%= error_messages_for(:item) %>
<tr id="<%=item.id%>">
<% for column in Item.content_columns %>
<td><%=h item.send(column.name) %></td>
<%
2012 Sep 13
3
Creating a link_to from a collection_select
I want to be able to change one attribute of a link_to to be what is the
current selection of the collection_select. And needless to say I can''t
quite figure it out.
app/views/tasks/show.html.erb
Who would you like to assign this task to?<br />
<%= link_to ''Myself'', :controller => ''task_queues'', :task_id => @task.id,
:action =>
2012 Nov 01
2
SyntaxError in Posts#index
getting this error
compile error
/Users/bradwrage/webapps/blog/app/views/posts/index.html.erb:5: syntax error, unexpected ''=''
...w Goal", new_post_path, class="btn btn-success" );@output_bu...
^
/Users/bradwrage/webapps/blog/app/views/posts/index.html.erb:7: syntax error, unexpected kDO_BLOCK, expecting kEND
''); @posts.each
2007 Jun 03
6
mongrel cluster w/ apache
hi all,
i''m working on deploying my app w/ apache and a mongrel cluster. i''ve
started by copying the instructions and code from the agile rails book
and everything seems to be working fine but apache isn''t forwarding my
requests to mongrel the way i expect it should. there''s nothing in the
rewrite logs and nothing but 404 errors in the apache error logs.
2009 Jul 07
10
link_to, how do you combine url options and html_options?
I have a link-to that I wish to look somewhat like this:
link_to "link here", new_object_path,
:method => :post, :confirm => ''Press OK'', #url
options
:class => "css_class", :id => "css_id" #html
options
In any case I can either get the url_for options to work or the html
options to work, but
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 Jan 16
5
A function that return a link_to, Possible ?
Hello, I try this :
in application_helper.rb
-----------------------
def lnk bla
return link_to bla, { :controller => bli , :action => "blo" , :id
=> "blu" }
end
in file.rhtml
-----------
<%= lnk "yo!" %>
This return an error. There is a way to do this or something similar, or
this is completly impossible ?
Thanks
2006 Apr 04
2
How to apply class from Stylesheet to "link_to" element???
Hi,
This is the "img" class for anchor element inside my stylesheet.
=====================
A.img:link {
color: #ffffff;
text-decoration: none;
}
A.img:visited {
color: #ffffff;
text-decoration: none;
}
======================
I can easily apply this tag inside my html document as follows:-
=======
< a href="goodbye.html" class="img">
=======
Now I want to
2011 Feb 12
5
link_to a action in the controlles is not called
i have a link where it has to call a method defin in todoscontroller
named say_when but show is called
<td><%= link_to ''Say when'', todo, :action => :say_when ,
:remote => true %></td>
class TodosController < ApplicationController
# GET /todos
# GET /todos.xml
def index
@todos = Todo.all
respond_to do |format|
format.html #
2008 May 01
20
link_to meta programming question
I am trying to create a dynamic menu using the following construct:
<%- menu_list = [ ''first'', ''second'', ''third''] -%>
<ul>
<%- menu_list.each do |m| -%>
<%= link_to "List All #{m.titlecase.pluralize} <m>_path %>
<%- end -%>
</ul>
What I cannot determine is what I have to do to replace
2006 May 02
1
Accessing Parameters - Params (nil)
I''m trying to render a component that pulls information based on a
parameter that is passed by a link_to item, but my params object is nil
for the following code in the controller:
records = ControllerName.find(params[:id])
but the error page also has this: Parameters: {"id"=>"7"}
I''ve tried to access it (in the controller) using:
variable =
2010 Jan 31
6
Action path - syntax error, unexpected tIDENTIFIER, expecting ')'
I have a user controller with login as action.
When I access the index.html.erb file via application.layout file. I get a
error on the login link on the index.html.erb page. I think I am having
dfifficulty in setting up path to an action or even understanding how to set
REST path properly. Can someone please help me.
Here is the error on the home page:
2006 Jan 25
11
Executing Ruby code that is inside a string
I would like to put Ruby code inside a string, between <%= %> tags, and
have the code inside the tags executed when the string is displayed. Is
this possible?
--
Posted via http://www.ruby-forum.com/.
2010 Sep 18
11
Commenting in an ERB without generating a compiling error
Hello,
I have the following:
<% @projects.each do |project| %>
<tr>
.
<td><%= link_to ''Destroy'', project, :confirm => ''Are you
sure?'', :method => :delete %></td>
.
</tr>
<% end %>
How can I safely comment out the TD line above? Do I have to use the
=begin way?
--
You received this message because you
2005 Mar 07
2
erb and builder in same view ....
Has anyone tried using erb and builder in the same file?
Either .rxml or .rhtml?
I''m wanting to do some think like the following:
xml.div(''id''=>''menu'') {|xml|
link_to "create race", :controller=>"derby", :action=>"new"
}
Thanks,
-- Tom.
--
"Nothing will ever be attempted, if all
possible objections must
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 Feb 12
6
Including another helper
I need to include another helper module apart from the normal two
(ApplicationHelper and [controllername]Helper). The inclusion needs to
be dynamic and based on external parameters (ie what helper that get
included differ from request to request).
Is it possible? How?
/Marcus
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