Displaying 20 results from an estimated 30000 matches similar to: "Link_to frustration...help?"
2011 Feb 23
5
Routing problem
In my app i have word model, words_controller and want create new
action for word model.
I create new method ''test'' in words_controller, and adds:
resources :words do
member do
put ''test''
end
end
in routes.rb
my rake routes output:
test_word PUT /words/:id/test(.:format) {:action=>"test",
:controller=>"words"}
2010 Sep 09
17
formtastic issue
Hello,
I will try to explain it step by step :-)
I just created a new rails 3 app, then I created a new controller...
rails generate controller admin::users
I didn''t forget to add the resources in the routes.rb file like this.
namespace :admin do
resources :users
end
Now I try to use formtastic to create the form but I get erorr that my
users_path doesn''t exist?
2011 Apr 11
12
Freelance Developer using Rails
Hi all,
Is anyone doing freelance rails development? I need some advice
before I jump in.
Thanks,
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
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 Dec 08
9
link_to popup
Hello All,
I have a link. Which I want to open as a new window :-
<%= link_to "Google", "https://www.google.com", :popup =>
[''new_window_name'',''toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'']
%>
But it is opening in the same page....
Any suggestions how to do it ??
Even hover will be
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,
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 Jun 20
4
Invoking MouseOver using link_to tag ?
Hi,
How can we trigger a JavaScript built in function from a <%= link_to %>
ie. i have the below statement in my view. I want to invoke a JavaScript
function on "MouseOver" of this below text (''TestingMouseOverEvents'').
<%= link_to "TestingMouseOverEvents" , :controller => "login", :action
=> "logout"%>
Note: The
2012 Oct 10
8
link_to with additional data
Hi,
rails 3.2.8
I must be missing something basic (and it''s been driving me mad) because I
am trying to send one additional data attribute to my controller from a
link, but I can''t seem to get it into the params received by the controller.
I have looked around and found answers, but none seem to affect my links.
I''ve set up a dummy app with a home page and a single
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 #
2010 Apr 23
2
link_to with resource routes in helper file?
Hey all!
Any pointers on doing something like:
link_to "Comments", comments_path
from within a helper file just like you can do from a view?
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To
2013 Jun 05
1
Link_to image_tag popup
Hello All,
How can I add a popup in link_to image_tag?
I am trying as :-
<%= link_to image_tag(@user.avatar.url(:small)), ''/users/edit'',
:popup=>[''original_image'', ''height=700,width=900''] %>
It goes to the edit page. But it doesn''t opens popup.
Is this the correct way to call a popup?
How can I achieve this?
Thanks,
2010 Aug 24
11
will_paginate problem
Hi
I am using rails 2.3.8 & ruby 1.3.7 & will_paginate 2.3.14
I have table name books. I am doing this code for pagination,
In book_controller
@@@@books = Book.paginate :page => params[:page], :per_page => 10@@@@
& in index.html.erb
@@@@@<%= will_paginate @books %>@@@@@
Also added in environment.rb file this line
@@@@@ require
2012 Aug 07
9
How do I force link_to/form helpers to use the superclass name in the path instead subclass?
I want my helpers to generate paths using a superclass instead of the
subclasses. Assuming I have Owner and Member that both inherit from User,
rails will use the current objects class name when generating paths:
Let''s say current_user is a mod: <%= link_to current_user.name,
current_user %> will generate "/mod/:id". I want to force it to generate
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
2010 May 28
1
link_to pmultiple parameters
Hi everybody!
I''m new to this wondeful world that Ruby On Rails is.
I''m trying to pass multiple parameters using link_to, but i don''t even
know if it''s possible.
Here''s the code in where the link_to is used :
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
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
2012 Feb 29
4
how to use link_to with :remote=>true in rails 3.2.1
I m using Rails 3.2.1. how to use link_to with remote=>true
--------------------------------------------
My Method in Controller
def clickme
@clk = "you click me"
respond_to do |format|
format.js { render :layout=>false }
end
end
--------------------------------------------
My View
In my new.html.erb file
<%= link_to "click here",
2010 May 22
3
Rails 3: link_to with "data-confirm"
Hi,
has anyone experienced any problems with the new link_to and
data-confirm in Rails3? It seems when you create a link with instead of
link text, an image, the confirm message isn''t shown.
<%=
link_to(
image_tag("delete.png", :alt =>
t("helpers.label.destroy")),
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: