search for: user_pages

Displaying 20 results from an estimated 24 matches for "user_pages".

2006 Apr 06
3
scaffold question
...ngs 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 - is that something i can do with any of my model automatically just by having @model_pages in the action? -- Posted via http://www.ruby-forum.com/.
2007 Jul 19
2
Transform URLs from: "url.com/Bob+Doe" to "url.com/bob_doe"
Is that possible, and would you know how I can do that? I''m creating individual pages for users based on their first and last names. In my routes.rb, I have: map.client '':user_full_name'', :controller => ''user'', :action => ''individual_user_page'' Then in my controller, I have: def individual_user_page @user =
2016 Nov 25
3
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 04:21:39PM +0100, Dmitry Vyukov wrote: > > READ/WRITE_ONCE imply atomicity. Even if their names don't spell it (a > function name doesn't have to spell all of its guarantees). Most of > the uses of READ/WRITE_ONCE will be broken if they are not atomic. In practice, this is certainly the assumption made by many/most users of the *_ONCE() accessors.
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> >--- > net/vmw_vsock/virtio_transport_common.c | 212 ++++++++++++++++++++++-- > 1 file changed, 195 insertions(+), 17 deletions(-) > >diff --git a/n...
2006 Apr 26
1
List shows always first page
...39;'s fine except that the pagination. Be default the list shows 10 records per page. I clicked "Next Page" and the page refreshed but the data is still same as the first page. The URL shows page=2 parameter. I opened the controller code and found the following code. def list @user_pages, @users = paginate :users, :per_page => 10 end I changed 10 to 100 and the page showed 100 records but still the 2nd page showed the 1st page. Did I miss something? Or should I add code to make the pagination work? Thanks. Sam -- Posted via http://www.ruby-forum.com/.
2006 Mar 31
2
Silly question
Hi there, I know this is be a very minor issue, but considering @users = User.find :all, :order => ''name'' _AND_ @user_pages, @users = paginate :user, :order_by => ''name'' by simplicity, shouldn''t the symbols :order and :order_by be the same or both to both cases ? I stumbled on them a couple of times yet :) Thanks, Andre -- Posted via http://www.ruby-forum.com/.
2006 Jan 24
1
Pagination
Hello, maybe that I''m a stupid, but I don''t know how I can working with pagination. In all examples is written (for example) next: def user_list @user_pages, @users = paginate(:users, :order_by => ''name'') end So, it''s OK (as a scaffold) for all set of users. But I need a little other functionality. For example I need paginate only a little bit of this set. I have sort user by their function in laboratory and I don'&...
2016 Nov 25
3
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 5:17 PM, Peter Zijlstra <peterz at infradead.org> wrote: >> > What are use cases for such primitive that won't be OK with "read once >> > _and_ atomically"? >> >> I have none to hand. > > Whatever triggers the __builtin_memcpy() paths, and even the size==8 > paths on 32bit. > > You could put a WARN in there to
2016 Nov 25
3
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 5:17 PM, Peter Zijlstra <peterz at infradead.org> wrote: >> > What are use cases for such primitive that won't be OK with "read once >> > _and_ atomically"? >> >> I have none to hand. > > Whatever triggers the __builtin_memcpy() paths, and even the size==8 > paths on 32bit. > > You could put a WARN in there to
2006 Jul 05
3
list of users
...;'m not getting the list of projects done by each user.. This is my code:: <% for user in @users %> <%=link_to user.login,:action=>"list",:controller=>"projects",:id=>user.id%> <%end%> In the controller def list @user = User.find_all @user_pages, @users = paginate :user, :per_page => 20 end This is the error when i click on the user:: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.[] Could any please help?? -Harish -- Posted via htt...
2006 Aug 01
3
paginate, search, sort with ajax problem
hello I hope somebody can help me figure this out. found this great tutorial at http://dev.nozav.org/rails_ajax_table.html. got it working except for one thing. I can''t seem to make the pagination work. The link_to_remote defined in the helper is pointing to the wrong url. I have set up things like so: defined a search method in de project_controller located in apps/admin/project.
2006 Aug 12
0
Help needed in specifying conditions in pagination
Hi, In a controller, I add to the default list action a condition, thus: def list @user_pages, @users = paginate :users, :conditions => @query, :per_page => 10 end and @query is defined somewhere in the controller as @query = "user_name like ''%Smith%''" where user_name is an attribute of User. Result: The condition pulls out the whole table,...
2006 Jun 29
1
search action/ in different groups
...for group in @groups %> <input type=checkbox name=group#{group.id}> <% end %> </form> and then in my controller i put def index @users = User.find(:all) # annitiate the variable @groups = Group.find(:all) if params[:searchbar] != nil # no search @user_pages, @users = paginate :users, :include => :groups, :order => ''lastname'' , :per_page => 10 else # search done @groups.each {|group| if params["group#{id}"] == "on" #checbox is checked asso...
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 list (like those that I started out with scaff...
2006 Jan 03
0
has_and_belongs_to_many include problem
...id = " + @group_id.to_s + " and groups_users.group_id = groups.id and groups_users.user_id = users.id and users.last_name like ''%" + @last_name.to_s + "%'' order by users.last_name ASC, users.first_name ASC") i get an error on this (can anyone help me???) @user_pages, @users = paginate :user, :conditions => [''users.firm_id = ? and users.first_name like ? and users.last_name like ?'', @firm_id, "%#{@first_name}%", "%#{@last_name}%"] ,:include => [:groups], :order_by => "users.last_name ASC, users.first_name ASC&...
2006 Jan 04
1
Passing parameters along
...list comes back around do display page 2, it still remembers what conditions we are using? Assuming that I have to pass them explicitly, is there a shorthand way to simply say "take everything that''s already in params"? I tried this: link_to "Next", { :page => @user_pages.current.next, params } in the hopes that it would just append params onto the list, but got a syntax error. Duane -- Posted via http://www.ruby-forum.com/.
2006 Jul 27
1
response from ajax request
...partial template have been stripped, leaving only the elements inserted via the <%= statements. I would appreciate any hints. Best, Eric here is the controller action that responds to the ajax request: =============================== def find_users @user_is_admin = is_admin @user_pages, @users = paginate :users, :order_by => ''login'', :per_page => 10, :conditions => "name like ''%kyle%'' or children like ''%kyle%''" # add error checking later render :partial => "listing_table", :lay...
2019 Jul 25
0
[PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()
...make this work with Christoph Hellwig's > recent overhaul to bio_release_pages(): "block: bio_release_pages: use > flags arg instead of bool". > > I've started the series with a patch that I've posted in another > series ("mm/gup: add make_dirty arg to put_user_pages_dirty_lock()"[1]), > because I'm not sure which of these will go in first, and this allows each > to stand alone. > > Testing: not much beyond build and boot testing has been done yet. And > I'm not set up to even exercise all of it (especially the IB parts) at > run...
2019 Jul 24
20
[PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()
...a new patch, in order to make this work with Christoph Hellwig's recent overhaul to bio_release_pages(): "block: bio_release_pages: use flags arg instead of bool". I've started the series with a patch that I've posted in another series ("mm/gup: add make_dirty arg to put_user_pages_dirty_lock()"[1]), because I'm not sure which of these will go in first, and this allows each to stand alone. Testing: not much beyond build and boot testing has been done yet. And I'm not set up to even exercise all of it (especially the IB parts) at run time. Anyway, changes here a...
2019 Jul 24
20
[PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()
...a new patch, in order to make this work with Christoph Hellwig's recent overhaul to bio_release_pages(): "block: bio_release_pages: use flags arg instead of bool". I've started the series with a patch that I've posted in another series ("mm/gup: add make_dirty arg to put_user_pages_dirty_lock()"[1]), because I'm not sure which of these will go in first, and this allows each to stand alone. Testing: not much beyond build and boot testing has been done yet. And I'm not set up to even exercise all of it (especially the IB parts) at run time. Anyway, changes here a...