similar to: pagination problem

Displaying 20 results from an estimated 100 matches similar to: "pagination problem"

2005 Dec 01
0
problem with options_from_collection_for_select() need id not name
hey, i need a select list with a id property and not name, cuz i just ajax with this list and it checks on id not name if @request.post? #called by ajax if @request.xml_http_request? #called by ajax @geotag_id=params[:geotag_id].nil? ? -2 : params[:geotag_id] else @geotag_id=params[:geotag][:id].blank? ? -1:params[:geotag][:id] end else @geotag_id = -1 end i use this @geotags =
2005 Sep 28
0
search engine, select the selected option
hey, i have a search engine that let u search on the an employee how can i make that if the user select "employee1" , on the next page "employee1" is selected this is my code (rhtml) <tr> <td><label for="employee_id">Employee</label></td> <td colspan="3"><%= select "employee", "id",
2012 Mar 24
3
How to compute within-group mean and sd?
Hi, I want to run something like SELECT firm_id, count(*), mean(value), sd(value) FROM table GROUP BY firm_id; But I have to write a for loop like for ( id in unique(table$firm_id ) { print(paste( id, mean(table[firm_id == id, "value"]) )) } Is there any way to do it easier? Thanks :) Best, Reeyarn Lee [[alternative HTML version deleted]]
2008 May 07
1
Assigning to the foreign key on a belongs_to association
I''ve encountered what seems like an odd omission in the behaviour of belongs_to associations: if you assign to the foreign key attribute, it doesn''t update the associated object (or mark a previously loaded one as stale) until you explicitly save or reload it. Let''s say we have a Company model, which belongs_to :city : >> torchbox =
2005 Dec 15
3
How to delete a record
hey, i my database i have users and groups, each user can get in different groups my db structure: table groups: id, name, basegroup, firm_id table users: id, firstname, lastname, email table groups_users: group_id, user_id my relation is a many to many: class Group < ActiveRecord::Base has_and_belongs_to_many :users end class User < ActiveRecord::Base has_and_belongs_to_many
2005 Dec 29
3
Post problem with select lists
hey, i have this problem how come i always get -1 for the select list?? rhtml First, select a client. <select id="client_id" name="client[id]" onChange="submit();" > <%= options_for_select(@client_options, @client_id.to_i) %> </select><%= @client_id %> controller if @request.post? if @request.xml_http_request? #called by ajax,
2006 May 22
8
flickr tag question
hey, i am using the flickr wrapper for ruby and need to access the tags of a specific photo. i got all the rest working. i must admit i am kind of new to ruby, but i tried and tried and couldn''t figure it out. among other things i want to read geotags like in my example here: http://www.flickr.com/photos/whoisstan/146634506/ i''m sure it is deadsimple and i just overlooked it.
2005 Dec 14
0
how to get these records in has_and_belongs_to_many relation
hey, i my database i have users and groups, each user can get in different groups my db structure: table groups: id, name, basegroup, firm_id table users: id, firstname, lastname, email table groups_users: group_id, users_id my relation is a many to many: class Group < ActiveRecord::Base has_and_belongs_to_many :users end class User < ActiveRecord::Base has_and_belongs_to_many
2018 Jul 27
3
SHELL() function Asterisk 13 - can only accept one paramter in string?
Hi all This is a followup on my post "Asterisk 13 - system() dialplan app cannot call bash scripts" from yesterday I've given up trying to use system() to call BASH scripts with parameters from Asterisk 13. Turned out under Asterisk 13.22.0 System() DOES work, but only if you do NOT attempt to pass any parameters to the called script. This works, and reliably calls the script:
2006 Jan 09
3
Incoming Zap channels not behaving as expected. Rejecting call on channel....
I have been messing with Asterisk for months and got it working well with a SIP connection, but this is the first time I have set it up with TDM cards. The cards are configured, working and the T-1's (configured for PRI/DCHAN) and I can even call into it if I add the DNIS as an extension to default context. That is the oddity. I can find nowhere in the documentation that says anything about
2005 Dec 19
6
how to do security??
hey, i have maded some security in my website based on http://www.chaconforcongress.com/accounts/login Here they work with users, roles and persmission, and they check it like this, user.has_permission(permission). I have extended this to: users and groups with roles and permissions. With permissions like "view records","edit records","delete records",... def
2006 Jan 03
0
has_and_belongs_to_many include problem
hey, i have users who are in groups, and i have a search form, where i can search on group, user lastname, and user firstname. All this is also with pagination. these are my models class User < ActiveRecord::Base has_and_belongs_to_many :groups end class Group < ActiveRecord::Base has_and_belongs_to_many :users end in my controller i do this THIS works (but in need pagination) @users2
2005 Dec 22
0
conditions on model
hey, this is the situation, an user may only access x clients (ex , 1, 5 ,6 ,7), so i make a string with those ids and paste it to the sql statement, the user is from the session #creating a list of all the client record ids the user may access and paste it in the sql statement if user.has_permission(''admin'') || user.view_all == 1 text = "" else text =
2008 Sep 02
3
gps tags in vorbis comments
hi, is there an official or semiofficial way to store gps location in vorbis comments or any ogg file. mp4 and exif store at least: - location name (e.g. London, UK) - longitude (degree as double), latitude (degree as double), elevation (meters) (these three according to WGS84) Stefan
2011 Jun 12
2
A question about Caller ID
Hi all, Sorry if this is a little off topic, but I just want to know a thing here. What system is used for sending out the caller's number in the US? Here in Sweden we use DTMF to send the number out. I just need to know what is used in the US since I don't think I will be able to use an American caller ID device over here. Many thanks for any info, Christian
2004 Dec 07
30
Bind Variables in Active Record
OK, I have some basic functionality to support bind variables, it appears to work with the ''old'' %s style too. I''ve altered sanitize_conditions in activerecord/lib/active_record/base.rb to check whether bind variables are in the statement (/\?/). If they are, replace all the ?s to escaped values from the arguments array. else santize and expand. There are a few
2005 May 15
2
SIP Gerenal settings conufsion
I have a little confusion about the general settings (other than the register values) in the SIP General area. I understand that for examle in a SIP context like [FWD] or [BROADVOICE] the entries in those areas are ths settings that take effect in any communication woth FWD and/or BROADVOICE. However, I'm confused as to the purpose of the "general" settings -- to what or which
2007 Sep 28
4
undefined method error
Hi, I''m running the trunk version with drb server. In my ferret_server.log I get a lot of messages like this: #method_missing(:add, ["User", {:first_name=>"blah", :comments=>nil, :company=>"blah", :phone_day=>""}]) Over and over again. But more importantly, since yesterday doing a search has caused an exception: A NoMethodError
2011 Aug 12
8
Need some help with regular expression
I need to validate a string from a user (a location for use with geotagging) that is. I want to make sure that the user specify a city and a country in my inp ... So i wrote this => validates :usri_location, :presence => true, :format => {:with => /^[a-zA-Z]+{\,\s}+[a-zA-Z]/i}, :on => :create I want to make sure that the user writes city,
2007 Oct 07
0
Rails AR/Oracle Unit Test: [7769] failed (getting worse)
"bitsweat" has kicked AR/Oracle while it was down... http://dev.rubyonrails.org/changeset/7769 ------------------------------------------------------------------------ r7769 | bitsweat | 2007-10-06 22:29:37 -0700 (Sat, 06 Oct 2007) | 1 line MySQL: speedup date/time parsing. ------------------------------------------------------------------------ U