similar to: Query Offset Parameter problem

Displaying 20 results from an estimated 10000 matches similar to: "Query Offset Parameter problem"

2006 Aug 15
5
Hard time understanding the differences between "def self.foo" and "def foo"
Hi guys, I''m having a little trouble understanding the differences and knowing when to use "def foo" and "def self.foo" in my models. I don''t quite understand them and was hoping someone could explain or give me examples on how to use the "self." properly. For example, I had "def foo" in my model "Account" and in one of
2006 Aug 12
7
Redirect back to last page?
I have a few pages where a user may do something (add tags, login, etc) and I would like to redirect them back to the last page they were at before calling that action. Is there an easy way to do this? -- Posted via http://www.ruby-forum.com/.
2006 Aug 16
44
Goodbye for now, RoR
I started a php-based website a few months ago with a buddy of mine on netfirms.com. I was perusing their knowledge base and I came upon a quick-start for something called Ruby on Rails. Since then I have immersed myself in RoR. I''ve done the tutorials, I''ve purchased the books. But, I could never get even a sample RoR app to work on netfirms. 500 server errors.
2006 Jul 13
6
Migrations + foreign keys
Hi all, In the AWDR author use the execute method to declare foreign keys: execute "alter table.... add constraint.... foreign key...." Is there a ruby sintax to declare a foreign key in a migration class? -- Posted via http://www.ruby-forum.com/.
2006 Aug 17
3
What''s the best way to stop repeating this line in my controller?
Hi, I am trying to follow the "DRY" principle and came across a problem. I am working on a small ajax task manager, and right now in the index page which renders the list, I have (for example, in the Lists controller): def index @lists = List.find(:all) end Now within the controller there''s also a list_add action which is called via ajax.. def list_add if
2006 Aug 10
5
Ampersand Heartburn
Greetings all. I''m using the Microsoft "NorthWind Traders" database "orders" table as test data for the Rico LiveGrid JavaScript. The problem I''m noticing is that some of the records in the "ShipName" field contain ampersands -- which for some reason are not being escaped by Rails. Rails does in fact automatically escape all of the other
2006 Dec 15
1
How can I have two controllers use the same 'category' model if they aren't related?
Hi all, I have two controllers - "foods" and "receipes" which map to models. Each one will have multiple categories, but the categories are completely different for each one - they don''t share the same category. So they aren''t related at all. If I wanted to do this using resources, what is the best way to set this up? If I setup a categories controller and
2006 Feb 06
35
ROR Recipes Beta
Yesterday I got the beta version of ROR recipes book and the recipes are great. For those of you still thinking about it, I highly recommend the book. The only thing I wish is that if there were some more recipes (greedy me), especially AJAX related and installing an application within your current application. For instance, it will be great to see how one can implement the typo blog
2006 Aug 31
40
Rails Deployment Book
I''ve been mulling over an idea for a book covering Ruby on Rails application deployment. Obvious topics include using Mongrel by itself and with Apache/Lighttpd, load balancers, memcached, and Capistrano. What other topics would you like to see covered in such a book? Cheers, -- Dave Murphy (Schwuk) http://schwuk.com
2006 May 03
6
Scaffold Generation Problem
Greetings all, I''m sure there is probably a very obvious reason for the following problem. However, after much hair pulling, I am just not seeing it yet. As you can see from the trace below, I am not able to complete scaffold generation due to some problem between rails and mysql. I double checked MySQL to make sure both my Ruby user and Root user have full rights to the database.
2006 May 12
2
Agile WebDev 2nd Edition: PDF free for 1st edition owners?
Hi all I''m just wondering if I get the 2nd version of "Agile Web Development with Ruby on Rails" for free if I already own the 1st edition paperback/PDF combo? And anyway: I wanted to update my first edition, but I can''t find the link anymore where I could get a new PDF version? Thanks a lot for help. Josh -- Posted via http://www.ruby-forum.com/.
2006 May 02
96
[ADV] Second Edition of Agile Web Development with Rails
ANNOUNCING AGILE WEB DEVELOPMENT WITH RAILS, SECOND EDITION =========================================================== http://www.pragmaticprogrammer.com/titles/rails2/ Rails has changed a lot since we announced the first edition of the book a year ago. DHH says that the 1.1 release "boasts more than 500 fixes, tweaks, and features from more than 100 contributors." Who are we to
2006 May 18
4
Can I send rendered .html to somewhere besides the web server?
Is there any way to tell Rails to send the .html file it renders somewhere other than the web server? I need to save a page to the server''s file system instead of sending it to the user''s browser. Thanks! Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060518/facce47e/attachment.html
2006 Jul 21
3
Migration and Mysql row ID
Apologies if this has been discussed before, but with the search function down its hard to find out if it has The first Agile book recommended using the automatically assigned row id of an object as a foreign key reference, as rails would automatically interpret the attribute (for example) product_id as the table ''product'' and row ''id''. I''ve just
2006 Jun 20
4
Newbie Question to Get Rolling on Rails
I''m not sure if this is the right place to ask such questions. If not, my apologies and please direct me where such questions are handled. I am new to RoR and have been following the tutorial in Agile Web Developement with Rails. I have successfully gotten RoR up and running on my Mac (OS X 10.4.6) and created a MySQL database. However, on page 57 of the tutorial, the command
2006 Feb 11
3
read-only access to database?
I have a model (Query) which I use to, of all things, query the database. This is to enable raw SQL access. I want to ensure that db access using this model is read-only. Short of checking the sql query for ''insert'' and ''drop'' and ''update'', is there a more rails-like way of doing this in my app/models/query.rb itself? Thanks in advance,
2006 Sep 11
7
Safari Browser problems
I can browse a site I developed/deployed to Apache 2.2.3/Mongrel from PC/s with Firefox/Explorer. I can''t browse from Mac Safari? I checked these setting and it still doesn''t work... http://docs.info.apple.com/article.html?artnum=151263 I don''t know Mac''s, what esle could this be? Jim
2006 Jan 05
10
OT -- A "HOWTO" is a guide not a question.
This is way offtopic, but I''ve seen this several times recently and it''s annoying me. If you put "HOWTO" in your subject that means that you''re posting a guide on a particular topic. It doesn''t mean that you''re asking a question about "how to" do something. It''s not like it''s a crisis, but it screws up searches
2006 Mar 06
20
How painful is the 1.0 -> 1.1 upgrade going to be?
Does anyone have a sense for how painful the 1.0 -> 1.1 upgrade is going to be for existing apps? I''m finishing up my first real RoR application with Rails 1.0. I can live with it staying at that level, but I really want to use the has_many :through attribute to clean up some of my code. I''m not particularly interested in edge Rails, mainly because the documentation for
2006 May 09
2
Computing very large exponents
Greetings all. Does anyone have a clue how to use Ruby to do modular exponentiation using the binary left-to-right method? I looked through the documentation and searched the forums and found the String.each_byte method. However I had no luck finding anything showing how one might manipulate bits of bytes. Below is an example of what I am talking about. The calculation a = b^e mod n (or