search for: blamemike

Displaying 11 results from an estimated 11 matches for "blamemike".

2006 Jun 07
3
Pagination
Does anyone know if there''s a plugin to do pagination numbers like: Prev 1 2 3 4 5 etc Next And automatically move through the pages? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 06
3
has_and_belongs_to_many find
Say I have a post model that has_and_belongs_to_many :categories, and a category model that has_and_belongs_to_many :posts. So I have a categories_posts table to do the join. That''s all find and dandy. However I want to be able to find all the posts that belong to a specific category. I tried Post.find_by_category(:id) but that doesn''t work. Does anyone have any insight?
2006 May 04
3
Decimal
Can someone please tell me the best approach to adding support for editing MySQL decimal types in rails? I have a field in the DB that represents currency, and the view will not let save anything past the decimal place so, 10.99 becomes 10.00 automatically. Any help is appreciated. -- Posted via http://www.ruby-forum.com/.
2006 Feb 07
9
Is there a good time_select tag helper?
I''m trying to record a list of start and end times, and they''re simply an hour and a minute. Looking at the API, there''s a select_time helper, but that just creates the tag. There''s a datetime_select helper which takes an object and method name, so it does all the magic...but I only want to worry about the hour and the minute. I''ve tried writing my
2006 May 27
10
Displaying Hours
Here''s an intersting one: I have a client who wants to store hours of operation of a business for their RoR web app. I came up with a solution, but I really don''t like it. I have a MySQL table that has these fields monday_start, monday_end, tuesday_start, tuesday_end, etc., all as time fields. That''s all find and dandy. The kicker is, the client wants the hours to
2006 Jun 02
2
Natural Search
Does anyone know what the best approach would be to do a search against mutiple fields from one text string in a RoR app? My client wants its user base to be able to issue a search like: "Record Stores in 12321 Jazz" So, esentially, the query would have to check a couple tables, and a couple fields in each table. Thanks for any help. -- Posted via http://www.ruby-forum.com/.
2006 May 25
2
page.replace_html
This is odd. When I call: page.replace_html ''formdiv'', :partial => ''listing'' from an rjs file it renders stuff like: \n \n \n test \n \n test , NY 12344 \n \n Phone: (999)999-8888 \n\t\t\n\n \n \t\n \t\thttp:// \n \t\n \n \n \n"); } catch (e) { alert(''RJS error:\n\n'' + e.toString());
2006 Jun 05
1
Form Field
I''m trying to get the value of a form field (input type="text" id="name">) from a controller via the params hash, but this isn''t working. I thought params[:name] would return this. The textbox is not part of the model. Does anyone know how to do this?? Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Jun 07
3
validates_uniqueness_of two fields
Is it possible to do a validates_uniqueness_of :name, :zip but only in that context? I''d like to be able to have that zip used again, but not in conjunction with a name already with that zip. Does that make sense? -- Posted via http://www.ruby-forum.com/.
2006 Jun 12
0
Multi-Models
I''m not sure what the best approach to this is: I have two tables in the DB, one is say global_resources, and the other is specific_resources. The global_resources table is going to be a global set of resources that can be used on any project. The specific_resources link to the global, and have additional fields. So basically you can drag a resource (global) to a project, or add a
2006 Jun 01
7
Second Insert
I''m having a problem trying to come up with the best way to go about doing something in a Rails app. Here''s the situation: I have a form with a list of check boxes a client can choose from, but my client also wants the user to be able to submit their own item, wich will be saved in the table that populates the check boxes. Does anyone have any insight into this? Thanks a