Displaying 20 results from an estimated 9000 matches similar to: "Passing parameters along"
2006 Jul 05
3
list of users
Hi all,
I''m creating admin module. in that module i need to get the list of
users and also the projects created by the each user.
No doubt i''m getting the list of users. but i''m not getting the list
of projects done by each user..
This is my code::
<% for user in @users %>
<%=link_to
2006 Jul 27
1
response from ajax request
Hi, newbie here.
I am trying to implement a filtering interface using observe_field.
Using firebug I can see that I am getting the properly rendered html
blob back in the response, but when it get inserted into the dom element
that I am targeting, the plain html elements from the partial template
have been stripped, leaving only the elements inserted via the <%=
statements. I would
2006 Apr 25
6
Does Rails need more useful URL helpers?
Similar topic to my last post, but a different brand of methods. In
particular, the url_for and link_to methods have come to bother me at
times. I will mention one instance in particular:
I am designing a high-end administrative interface. This interface
supports paging, sorting and limiting to specific field values. Thus I
have params named page, sort and limit.
The lack of elegance I see
2005 Mar 29
2
Annotation metadata "kills" help.search
Greetings!
OS: Windows
R 2.0.1
Before anyone flames -- I tried to query this on the R searchable web site
and using google and did not find anything applicable.
As of about a week ago the help.search function dies when used in the simple
help.search("something") usage.
The error is
Error in rbind(...) : number of columns of matrices must match (see arg 203)
After some effort I have
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 Feb 15
0
Confused by this error when trying to use ''pagination''
Trying to create stuff without resorting to scaffold command.
I have a list view in my login_controller.rb file...
def list_users
@user_pages, @users = paginate :users, :per_page => 14
end
I have a command in my list_users.rhtml file which undoubtedly calls
this pagination...
<%
odd_or_even = 0
for user in @users
odd_or_even = 1 - odd_or_even
%>
and instead of being presented a
2006 Jan 27
0
custom paginator generating Next link when not needed
I implemented a prefix search using the following custom paginator:
@performer_pages = Paginator.new self, Performer.count, 25,
@params[''page'']
@performers = Performer.find( :all,
:conditions => ["Name >= ?", params[:prefix] ],
:order => "Name ASC", :limit =>
@performer_pages.items_per_page,
:offset =>
2006 Apr 06
3
scaffold question
there are some things on a scaffold that i would like to use without the
whole thing. is it better to generate one and then cut it down to only
what you''ll use?
are all of the things in a scaffold available to just build by hand? for
instance, i have a scaffold for my users. in the list action, it has
@user_pages, so that you can put @user_pages.current.next or something
like that -
2006 Sep 14
2
passing invisible parameters
I am unable to find any information about invisible parameters. I
currently have some code like this:
<%= link_to ''page'', :controller => ''form'', :action => ''new'', :type =>
''first_type'' %>
<%= link_to ''page'', :controller => ''form'', :action =>
2006 Jun 30
3
passing parameters to functions
I''m new with ROR and am confused about passing parameters to functions.
I have a controller called Schedules and that calles a calendar helper
for a view called show_cal.rhtml. I need to be able to pass in a
specified month and year to get the correct schedule calendar to display
in the view. I''m just starting with this and am simply trying to
display the parameters
2006 Apr 16
11
Best way to sort categories w/ pager
Ahoy,
I made this pager,
" def list
@item_pages = Paginator.new self, Item.count, 10, @params[''page'']
@items = Item.find :all, :conditions => "category_id =
#{params[:condition]}",
:limit => @item_pages.items_per_page,
:offset => @item_pages.current.offset
@categories = Category.find_all
2006 Aug 07
2
Newbie question about adding product to cart
Hello. I''m using the Agile Web Dev. book 1st Edition and I''m puzzled by
the code on pp. 83-84.
<%= link_to ''Add to Cart'', {:action => ''add_to_cart'', :id => product },
:class => ''addtocart'' %>
def add_to_cart
product = Product.find(params[:id])
@cart = find_cart
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"}
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 May 05
1
link_to - passing parameters
Hi. Is it possible to compose GET request using ''link_to'' and get passed
params like: params[:foo][:bar]?
2006 Jan 03
1
Passing parameters with link_to
I have following code in my controller:
class AlbumsController < ApplicationController
def list_by_year(year)
@album_pages
@albums = paginate :albums,
{ :per_page => 10,
:conditions => ["year = ?", year] }
render :action => ''list''
end
end
Now I want to make a link to the list_by_year action in
2005 Dec 31
3
Semi-Dynamic table sorting (without AJAX)
In a previous thread some people were interested in ways to sort a
table. I mentioned a simple method for doing so by using links in the
titles. Having actually tried to implement this strategy, I have come
across several refinements that I would like to share.
First...
your table view should look like this...
...
<table>
<tr>
<th><%= link_to
2023 Feb 16
0
[RFC PATCH v1 07/12] vsock/virtio: MGS_ZEROCOPY flag support
On Mon, Feb 06, 2023 at 07:00:35AM +0000, Arseniy Krasnov wrote:
>This adds main logic of MSG_ZEROCOPY flag processing for packet
>creation. When this flag is set and user's iov iterator fits for
>zerocopy transmission, call 'get_user_pages()' and add returned
>pages to the newly created skb.
>
>Signed-off-by: Arseniy Krasnov <AVKrasnov at sberdevices.ru>
2006 May 17
2
NOOB: Passing parameters between pages
Folks,
I have a rhtml page (page A) that links to another page (page B), and I
want to pass some parameters from page A to page B.
Here is the link code (on page A):
<%= link_to ''Edit'', { :action => ''edit'', :id => permit }, :post => true
%>
If I want to pass a parameter "name" and a value "marcus", and pick it
up on page
2006 Mar 13
2
feature request/change for 2.6.8
Wayne,
I've been experimenting with the {pre,post}-xfer exec options ever since the original diff showed up in patches/ - fantastic stuff.
My feature request/change centers around the new RSYNC_ARG# variables. Would it be possible to make these available as an array (ie: ${RSYNC_ARG[#]}) rather than discrete variables? If nothing else, it would greatly simplify chewing through all the args