Displaying 20 results from an estimated 10000 matches similar to: "Newbie Syntax Question: Insertion Bottom with link_to and render Partial"
2008 Feb 19
1
adding an onclick option to link_to method
Hello,
I''m trying to use the rail link_to to open a popup window and then
print the popup window at the same time. Is there a way to add
another "onclick" option to tell the popup to print? I know how to do
this in javascript but not sure how to use the rails help to do it. I
also am aware that the link_to_function method is used to call a
javascript function.
2007 Feb 27
1
link_to :post true Newbie question
Hi All,
I am attempting to use a link_to helper to perform a form post using the
following construct:
<%= link_to ''Save'', {:action =>''create''}, :post => true %>
What I find is the parameters passed to the webserver are empty. My
model validation stuff triggers indicating the fields in question are
empty too. This is to create a new DB entry so no
2006 May 02
1
Newbie problem with Ajax and render partial
Hi all,
I''m having this problem that I''m sure will take most of you all but two
seconds to solve, but I''m very much a newbie. I read the documentation,
googled for an answer, to no avail.
I have simple page that lists items, each item as a row in a table. Each
item has a rating and a link to increment/decrement rating. When using
+/- on a rating on the first item,
2006 Jan 17
6
link_to or helper to generate a javascript:history.back() ?
Hello,
There is an link_to option or an helper that generate a link like :
<a href="javascript:history.back()">Back</a>
Thanks
2006 May 03
2
render partial collection
my view contains a call to a partial:
<%= render(:partial => ''item_list'', :collection => @keyword.synonyms,
:locals => { :action_delete => "removesynonym", and_some_other_stuff
})
%>
_item_list.rhtml contains:
<%= link_to (
image_tag(''/images/deletebutton.png''),
{ :action => action_delete,
:id =>
2007 Feb 18
0
Newbie question on has_may : through and link_to
Ok. This is a stupid newbie question.
We have a database which has tables of topics, countries, countrynotes
and countrynotes_topics
(Any countrynote can relate to multiple topics and any topic can
relate to multiple country notes, each countrynote can relate to only
one country). What I want to do is when I show the index of topics,
each topic will have a link_to that will generate a index page
2006 May 03
0
render partial collection passing property
my view contains a call to a partial:
<%= render(:partial => ''item_list'', :collection => @keyword.synonyms,
:locals => { :action_delete => "removesynonym", and_some_other_stuff
})
%>
_item_list.rhtml contains:
<%= link_to (
image_tag(''/images/deletebutton.png''),
{ :action => action_delete,
:id =>
2008 Oct 31
6
link_to submit form value 2
Hi to all,
I''d like to pass with a link to values inside some form. I''ve read in
other posts that it''s possible if i include the forms inside a html
<div>...
So here it''s my code of the view :
<div id="study">
<table>
<tr><td><label for="study_titolo">Titolo di
2006 Apr 30
4
renamed partial won''t render?
hi all
this works
<%= render :partial => "admin/works/work", :collection =>
@artist.works %>
but this doesn''t
<%= render :partial => "admin/works/worklist", :collection =>
@artist.works %>
even though the partial _work.rhtml and _worklist.rhtml are identical.
worklist.rhtml throws
undefined local variable or method
2006 Mar 16
1
Newbie Question on Link_to Method
Hi,
How do I use link_to method to link a page to another page in a
different views folder.
Say I have Projects and Issues, and on projects list page, I want a
hyper link ''New Issue'' to link to new issue page.
/Projects/List
/Issues/New
How do I code in views\projects\list.rhtml to link to views\Issues\new.rhtml?
this doesn''t work: <%= link_to "New
2006 Aug 04
2
Newbie Question: fom_tag_remote return HTML
Hi Everyone,
I am still only 1 week old on Rails and I am trying to implement an
AJAXy "Add comment" sheet. On the post for a new comment, I want to
use form_tag_remote. I would like to use a partial that I want to
render for the newly posted comment once the Submit happens. What is
the syntax to say, render a partial once the submit happens?
Thanks,
Vinod
2006 Mar 28
3
Brand newbie question relating to link_to
I recently dived into Rails and am having trouble with the link_to method.
I''d like to pass some parameters to the action being called and am not sure
how to do it. Essentially, I want to hyperlink a total count of bugs
queried from the database to a method that will return the bug numbers when
clicked on. I have a method, bug_total, that returns the total number to
display in the
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 Feb 05
6
render partial -- show certain content only if...
i''m working on a _post.rhtml partial, and it displays one blog post.
i''m accessing this partial on the list.rhtml and the show.rhtml
what i''d like is to only show the "link" link on the list.rhtml and not
on the show page.
<%= post.title%>
<br />
<%= post.body%>
<%= link_to
2009 Sep 24
4
Action Controller ::MethodNotAllowed
Hi,
Iam getting the following error
ActionController::MethodNotAllowed
Only get, put and delete requests are allowed.
Actually, Iam trying to have multiple actions for a form to create
new record. The actions for the form are cancel, save, publish and
preview.
here''s the config/routes.rb file code snippet for the relevant
controller - Events
map.resources :events, :member =>
2006 Aug 11
0
Calling find method on partial render
I want to add a display of personal links to my users. Is there a way
I can call a .find method when a partial is rendered?
This is in my website''s template:
<% if !session[:user_id].nil? %>
<%= render :partial => "/layouts/personal_links" %>
<% end %>
The contents of the partial are:
<ul id="user_links">
<li>My Links
<ul
2006 May 31
1
embedding link_to''s as part of rendered text.
Hi,
I''d like to be able to do a database query, fetch some text, and add an
''Accept Request'' and ''Deny Request'' within the text. Both of these would be
links so if the user were to click on them, they would essentially send POST
requests back to the server. Since this is dynamic, I wanted to know the
safest/best approach in embedding these links
2007 Sep 20
2
Rendering a partial from within that partial
I am having trouble rendering a partial called ''names'' through a submit
tag located within that partial. The form data is saving with my current
code. However, the existing data is not loading into the form and the
partial is not being re-rendered upon submission to reveal the changes
to this data.What might I do to fix this?
show.rhtml
<%= javascript_include_tag :defaults
2008 Mar 16
1
form_for error
Hi all,
I have the following code in my application layout:
<div id="utility">
<% if logged_in? %>
<%= link_to "Sign Out", logout_path %>
<% else %>
<%= link_to_function "Sign in",
"$(''signin'').toggle();$(''signin_link'').toggle()",
:id => "signin_link" %>
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 #