[Rails] Re: Using multiple databases

2009-10-28 Thread dare ruby
Thanks maren for your suggestion > Rails will deal with multiple databases. But why do you need a separate > DB for your archives? That seems pointless. I need to reduce the huge load in the same db and i want the archives in a seperate DB so that i can take regular backups seperately the l

[Rails] Re: Error in migrating the Postgres database

2009-10-28 Thread madhuri godade
Hello sir, I have installed gem to install is ruby-pg gem to install is postgres gem to install is postgres-pr But still getting the same error... uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn Is there any configuration needed for the postgreSQLAdapter...

[Rails] Re: Flexible model associations

2009-10-28 Thread Matthew Shapiro
Marnen Laibow-Koser wrote: > Why did you comment it out? You can always use your version control > system to bring it back. > Good point, I should know better... > Probably a bad idea. It's worth taking the time to model your data > correctly. Why is the single table with a first object and

[Rails] Re: Register Error

2009-10-28 Thread Kevin M
There is an input for login, password and password confirmation. I'm using my Gmail email so I'm confident it is correct and long enough. I will check all my forms and pages are correct. This is the new.html.erb: - Register <% form_for @user, :url => account_

[Rails] Re: Could someone tell me if the query is secure

2009-10-28 Thread Marnen Laibow-Koser
Mitchell Gould wrote: > > > I understand that its easy for someone to do all kinds of nasty things > to a database. I am trying to work on security. > > Could someone tell me if the following query is structured correctly for > security > > #find matching manufacturers > def self.find_all(ma

[Rails] Could someone tell me if the query is secure

2009-10-28 Thread Mitchell Gould
I understand that its easy for someone to do all kinds of nasty things to a database. I am trying to work on security. Could someone tell me if the following query is structured correctly for security #find matching manufacturers def self.find_all(manufacturer="") find(:all, :order =>

[Rails] Re: Flexible model associations

2009-10-28 Thread Marnen Laibow-Koser
Matthew Shapiro wrote: > Ok so since I cannot figure out how why that error is occurring, I > commented out the membership stuff Why did you comment it out? You can always use your version control system to bring it back. > and went with the single table with 2 > object method. Probably a b

[Rails] Re: User driven form creator?

2009-10-28 Thread Marnen Laibow-Koser
steve bell wrote: > Hi Marnen, > > They would be web forms. Plan is that the intranet administrator (who > is non-techie) can define the form by specifying the fields and then > the users get the form presented to them to fill in as a web form. > When they have completed the form the details woul

[Rails] Re: Flexible model associations

2009-10-28 Thread Matthew Shapiro
Ok so since I cannot figure out how why that error is occurring, I commented out the membership stuff and went with the single table with 2 object method. So I have the following models: class ObjectRelationship < ActiveRecord::Base belongs_to :first_object, :class_name => 'WritingObject', :

[Rails] Re: Ruby On Rails Tutorial for Mac?

2009-10-28 Thread Frank Guerino
Regarding the multiple referrals to "Programming Ruby", I just wanted to say that I already read it and, yes, I agree that it is a solid reference. Thanks again, Frank -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: Ruby On Rails Tutorial for Mac?

2009-10-28 Thread Frank Guerino
Conrad Taylor wrote: > First, I would highly recommend purchasing the book, "Programming Ruby > 1.9" because you will need a reasonably good foundation of the > language of Rails. Second, I would recommend getting the book, "Agile > Web Development with Rails 3ed" because it includes a step by st

[Rails] Re: Authlogic Page View Authentication Help

2009-10-28 Thread about2flip
figured it out. On Oct 28, 6:02 pm, about2flip wrote: > Hi: > > I am a newbie at ROR, and I am grasping my head around Authlogic. I am > having hard time trying to figure out how can I do the following: > > in my application controller I have the following helpers: > > filter_parameter_logging :

[Rails] automatically recieve mail

2009-10-28 Thread Ahmet Kilic
Hi! I want to make mobile phone registration system with e-mail confirmation. firstly, When user send the e-mail from the cell phone then user will recieve an register url by e-mail. It likes an error handling system, when error happen the system will send the error message but it is a bit di

[Rails] Re: Multi-Tier Architecture in Ruby on Rails?

2009-10-28 Thread Kris Williams
I think what Suki means is distributed architecture, as in: database server, caching server, application server(s) and web farm. In most enterprise environments you would connect distributed applications to a middle-tier server using SOA (UDDI/WSDL/SOAP), but the Ruby/Rails ilk seem to reject

[Rails] Re: Ajax in RoR - observe_field

2009-10-28 Thread Misiek Sz
Leonardo Mateo wrote: > On Sun, Oct 25, 2009 at 3:23 PM, Misiek Sz > wrote: >> saved when the form is submitted? > OK, now the situation is clearer for me. There's something you're not > getting from associations, let's see if with the example you get it > more clear. > If you want to create the

[Rails] Re: Rails form POSTing NULL values

2009-10-28 Thread face7hill
Hi smeade, I embedded the comment form on the guestbook view. Comments are just guestbook entries. So, to confirm, guest_book.html.erb has a comment form that uses the comments_controller.rb, i.e. I did not mis-paste the code. The "create" action is where things appear to break. Any other tho

[Rails] Re: Rails form POSTing NULL values

2009-10-28 Thread smeade
You pasted the code for guest_book.html.erb , yet your controller is using new.html.erb. Confirm the code you pasted as guest_book.html.erb is actually for new, or paste the 'new' view. On Oct 28, 4:00 pm, face7hill wrote: > Hello All, > > Several of my Rails apps on a server broke all at once.

[Rails] Re: database query and loops

2009-10-28 Thread h3avyarms
Thank you for the fast response, I was resorting to using if statements in my current setup and the last_user = @users.pop solution is much cleaner and should actuolly run faster for really large loops. On Oct 28, 8:33 pm, Philip Hallstrom wrote: > On Oct 28, 2009, at 5:23 PM, h3avyarms wrote: >

[Rails] Re: database query and loops

2009-10-28 Thread Philip Hallstrom
On Oct 28, 2009, at 5:23 PM, h3avyarms wrote: > > Quick question, for example if you have in your controller: > > @users = User.all > for user in @users if user == @users.last # do something with the last user end > # blah blah blah > end > > what is the best and most strait forward metho

[Rails] database query and loops

2009-10-28 Thread h3avyarms
Quick question, for example if you have in your controller: @users = User.all for user in @users # blah blah blah end what is the best and most strait forward method to find out if you have reached the last user in @users? --~--~-~--~~~---~--~~ You received this

[Rails] Re: Multi-Tier Architecture in Ruby on Rails?

2009-10-28 Thread sax
Right. It's MVC, rather than three-tiered. It is fairly flexible to different architectures, as it's easy to map external RESTful resources in or out using ActiveResource or other gems. Using Passenger as your Rails server takes care of serving a lot of your static content without the overhead of

[Rails] Re: Multi-Tier Architecture in Ruby on Rails?

2009-10-28 Thread Leonardo Mateo
On Wed, Oct 28, 2009 at 5:47 PM, Suki wrote: > > Hi there, > > I am pretty new in Ruby on Rails world. Current, I am working with a > single tier ROR application. Came from J2EE world, just wonder how > Multi-Tier Architecture works in ROR world? Can anyone share your > experience with me? RoR i

[Rails] Re: What is the future of Ruby on Rails? MySQL? Compare with Java, MS SQL or Oracle?

2009-10-28 Thread Leonardo Mateo
On Wed, Oct 28, 2009 at 5:51 PM, Suki wrote: > > Just got into this ROR world, and wondering  around! Would like to > hear what others think about  ROR. > What is your point? What exactly do you want to compare? You're listing things that are barely comparable. Ruby On Rails cannot be compared wi

[Rails] Rate a user with acts_as_rated

2009-10-28 Thread Yang Chung
Hi Folks, I am trying to rate a user in User model with acts_as_rated It seems like it's not possible even when I use :no_rater option Has anyone done it before? Do you know a workaround? If you have or know, please let me know! Cheers, -- Posted via http://www.ruby-forum.com/. --~--

[Rails] Rails form POSTing NULL values

2009-10-28 Thread face7hill
Hello All, Several of my Rails apps on a server broke all at once. Specifically, any forms that POST no longer work; NULL values are being submitted instead of the form parameters. I've checked with Firebug that the forms themselves are sending the values but the "create" action in all my contr

[Rails] What is the future of Ruby on Rails? MySQL? Compare with Java, MS SQL or Oracle?

2009-10-28 Thread Suki
Just got into this ROR world, and wondering around! Would like to hear what others think about ROR. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send

[Rails] Multi-Tier Architecture in Ruby on Rails?

2009-10-28 Thread Suki
Hi there, I am pretty new in Ruby on Rails world. Current, I am working with a single tier ROR application. Came from J2EE world, just wonder how Multi-Tier Architecture works in ROR world? Can anyone share your experience with me? Thanks --~--~-~--~~~---~--~~ Yo

[Rails] Re: What should I do testing for an old application?

2009-10-28 Thread Suki
Thank you very much! I was thinking about it, but afraid to waste too much of my time. Your response confirm my thinking. Great. I just go ahead do it. On Oct 28, 1:53 pm, Marnen Laibow-Koser wrote: > Suki wrote: > > I got this Ruby on Rails application with incompletetesting, (many > > controll

[Rails] Problem with Scrubyt

2009-10-28 Thread Heinz Strunk
Hey, I'm trying to work with Scrubyt using one of the examples: #simple google example require 'rubygems' require 'scrubyt' @data = Scrubyt::Extractor.define do fetch 'http://www.google.com/' fill_textfield 'q', 'ipod' submit record "//o...@id='rso']" do name "//l...@

[Rails] Authlogic Page View Authentication Help

2009-10-28 Thread about2flip
Hi: I am a newbie at ROR, and I am grasping my head around Authlogic. I am having hard time trying to figure out how can I do the following: in my application controller I have the following helpers: filter_parameter_logging :password, :password confirmattion helper_method :all private

[Rails] Re: paginate issues

2009-10-28 Thread RubyonRails_newbie
that's what I am reading, and the code in there hasn't helped solve this issue! On 28 Oct, 21:53, Conrad Taylor wrote: > On Wed, Oct 28, 2009 at 6:56 AM, RubyonRails_newbie < > > > > > > craigwest...@googlemail.com> wrote: > > > Hi there, > > > I have managed to overcome my search issue, and now

[Rails] Re: paginate issues

2009-10-28 Thread Conrad Taylor
On Wed, Oct 28, 2009 at 6:56 AM, RubyonRails_newbie < craigwest...@googlemail.com> wrote: > > Hi there, > > I have managed to overcome my search issue, and now I am able to > return users successfully. > > I am now trying to paginate the results, so only 10 are displayed on > each page. > > The pa

[Rails] Re: paginate issues

2009-10-28 Thread RubyonRails_newbie
h when I try and add: @users = User.paginate_by_contents(@search.query, :total_entries => User.total_hits(@search.query), :page => params [:page], :per_page => 10) I get this in the browser: You have a nil object when you didn't expect it! The error occurred while evaluating nil.quer

[Rails] Re: multiple rails app with passenger on Debian

2009-10-28 Thread kitty00
I was trying to deploy them as: domain.com/app1 domain.com/app2 But I got the error message: the page you are looking for does not exist. On Oct 28, 3:45 pm, Marnen Laibow-Koser wrote: > kitty00wrote: > > Thanks! > > Yes, I did implement that way. each URI per virtual host per file. But > > i

[Rails] Re: User driven form creator?

2009-10-28 Thread steve bell
Hi Marnen, They would be web forms. Plan is that the intranet administrator (who is non-techie) can define the form by specifying the fields and then the users get the form presented to them to fill in as a web form. When they have completed the form the details would be emailed for processing.

[Rails] Re: render :file cached?

2009-10-28 Thread Tony
On Oct 28, 4:28 pm, Tony wrote: > On Oct 28, 2:53 pm, Tony wrote: > > > In my application I have a controller/view that displays the contents > > of an audit log file > > >   def audit_log > >     render :layout => 'table',  :file => AUDIT_LOG > >   end > > > The audit log is updated frequentl

[Rails] Re: multiple rails app with passenger on Debian

2009-10-28 Thread Marnen Laibow-Koser
kitty00 wrote: > Thanks! > Yes, I did implement that way. each URI per virtual host per file. But > it still did not work. What URIs are you using? What errors are you getting? Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. --~--

[Rails] Re: render :file cached?

2009-10-28 Thread Tony
On Oct 28, 2:53 pm, Tony wrote: > In my application I have a controller/view that displays the contents > of an audit log file > >   def audit_log >     render :layout => 'table',  :file => AUDIT_LOG >   end > > The audit log is updated frequently but the render call does not re- > read the file

[Rails] Re: multiple rails app with passenger on Debian

2009-10-28 Thread kitty00
Thanks! Yes, I did implement that way. each URI per virtual host per file. But it still did not work. On Oct 28, 1:24 pm, Norm Scherer wrote: > kitty00wrote:Actually, I want to deploy as sub URI. I found the following > instruction on phusion passenger web. But it still did not work. You can >

[Rails] Re: paginate issues

2009-10-28 Thread sax
Ah. The documentation is assuming an ActiveRecord find, not acts_as_ferret google is your friend? http://www.google.com/search?client=safari&rls=en&q=acts_as_ferret+pagination&ie=UTF-8&oe=UTF-8 On Oct 28, 11:35 am, RubyonRails_newbie wrote: > Hmmm... I must be missing something.. > > here's wh

[Rails] Re: mislav-will_paginate(will_paginate) #resolved

2009-10-28 Thread Duke Yamamoto
Jeffrey L. Taylor wrote: > Quoting Duke Yamamoto : > [snip] >> paginate works fine for index, but after search, only first page is >> showed, >> when I click "next" or "2", the error appears. >> ActiveRecord::RecordNotFound (Couldn't find Server with ID=search): >> app/controllers/servers_contro

[Rails] Re: Problem getting started with auto_complete

2009-10-28 Thread Pat Shaughnessy
Hi... I've been working on a gem recently that allows you to generate scaffolding for auto_complete behavior, among other things. The idea was to make it easier to get started with using a plugin like auto_complete. See: http://patshaughnessy.net/2009/10/1/auto_complete-scaffolding Based on your

[Rails] Re: User driven form creator?

2009-10-28 Thread Marnen Laibow-Koser
steve bell wrote: > Hi All, > > I need to add functionality to an intranet site where users can design > basic forms such as leave forms, change of details forms, request for > printing forms, etc via a web gui where they enter the label, select a > type, possible values (for tick and select boxe

[Rails] Re: Problem getting started with auto_complete

2009-10-28 Thread Freddy Andersen
That syntax was removed from Rails in 1.2.6 and moved to a plugin. Here is one plugin that can be used http://github.com/rails/auto_complete --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] User driven form creator?

2009-10-28 Thread steve bell
Hi All, I need to add functionality to an intranet site where users can design basic forms such as leave forms, change of details forms, request for printing forms, etc via a web gui where they enter the label, select a type, possible values (for tick and select boxes), etc. I've had a look aroun

[Rails] Problem getting started with auto_complete

2009-10-28 Thread Gee-off
I'm a n00b with Rails, and I'm trying to implement basic autocomplete according to Agile Web Dev w/Rails 3rd edition (p. 584-586) I've installed the auto_complete plugin, added the statement "auto_complete_for :game, :publisher" to my controller (Game is the model, publisher the field I want autoc

[Rails] render :file cached?

2009-10-28 Thread Tony
In my application I have a controller/view that displays the contents of an audit log file def audit_log render :layout => 'table', :file => AUDIT_LOG end The audit log is updated frequently but the render call does not re- read the file so it gets stale. Is there a way to tell render

[Rails] Re: paginate issues

2009-10-28 Thread RubyonRails_newbie
Hmmm... I must be missing something.. here's what I have so far: def search @title = "Search" if params[:q] query = params[:q] # First find the user hits... @users = User.find_with_ferret(query, :limit => :all) # ...then the subhits. infos = Info.find_with_f

[Rails] Re: multiple rails app with passenger on Debian

2009-10-28 Thread Norm Scherer
kitty00 wrote: Actually, I want to deploy as sub URI. I found the following instruction on phusion passenger web. But it still did not work. You can deploy multiple Rails applications under a virtual host, by specifying RailsBaseURI multiple times. For example: RailsBaseURI

[Rails] Re: paginate issues

2009-10-28 Thread sax
You should not need to add anything to your models, unless you want to change the default number of fetched results per model. In your controller, instead of doing @things = Thing.find(:all, :conditions => whatever) you can do this @things = Thing.paginate(:page => params[:page], :conditions =

[Rails] Re: multiple rails app with passenger on Debian

2009-10-28 Thread kitty00
Actually, I want to deploy as sub URI. I found the following instruction on phusion passenger web. But it still did not work. You can deploy multiple Rails applications under a virtual host, by specifying RailsBaseURI multiple times. For example: RailsBaseURI /app1 RailsBaseUR

[Rails] Re: mislav-will_paginate(will_paginate)

2009-10-28 Thread Jeffrey L. Taylor
Quoting Duke Yamamoto : [snip] > paginate works fine for index, but after search, only first page is > showed, > when I click "next" or "2", the error appears. > ActiveRecord::RecordNotFound (Couldn't find Server with ID=search): > app/controllers/servers_controller.rb:26:in `show' > [snip] Ch

[Rails] Re: paginate issues

2009-10-28 Thread RubyonRails_newbie
Sorry, Has anyone managed to get the willl_paginate plugin to work? The git hub site makes no sense, and the example isn't clear enough for me to know what im meant to be doing.. ie: What exactly do I need to put in the user.rb file in models What goes in the controller and what goes in the

[Rails] Re: What should I do testing for an old application?

2009-10-28 Thread Marnen Laibow-Koser
Suki wrote: > I got this Ruby on Rails application with incomplete testing, (many > controllers or views do not have unit test at all). > > Should I go back to write all unit test for each of controller or > view, then do integration test? Or I just forget about all of them, > keep going ahead wi

[Rails] mislav-will_paginate(will_paginate)

2009-10-28 Thread Duke Yamamoto
mislav-will_paginate(will_paginate) doesn't work after search. servers_controller.rb def index @servers = Server.paginate(:page => params[:page], :per_page => 20, :order => 'device_id ASC') respond_to do |format| format.html # index.html.erb format.xml { render :xml => @ser

[Rails] What's the simplest way to use ActiveResource in ruby (without rails)?

2009-10-28 Thread skarayan
I would like to use this class in a standalone project, but I have been unsuccessful thus far. Also, how does this class exactly communicate with the web server? Thank you. class Person < ActiveResource::Base self.site = "http://localhost:3000/"; end --~--~-~--~~~--

[Rails] confused by group_by

2009-10-28 Thread tyar...@yahoo.com
I just started using rails and am trying to learn fast but I am confused with what I have read about using group_by and could use some help please. I have two tables - students and evaluations students has many evaluations and evaluations have one student The student record has id, name, and gra

[Rails] What should I do testing for an old application?

2009-10-28 Thread Suki
I got this Ruby on Rails application with incomplete testing, (many controllers or views do not have unit test at all). Should I go back to write all unit test for each of controller or view, then do integration test? Or I just forget about all of them, keep going ahead with my new functions with

[Rails] Re: update a plugin

2009-10-28 Thread Scott Johnson
Could be. I've never heard of braid, but then I've never had any need for piston either. On Oct 27, 7:39 pm, Marnen Laibow-Koser wrote: > Scott Johnson wrote: > > You might try 'script/plugin update' which is designed to do just > > that. > > > Or look into 'piston' which is a much more sophist

[Rails] Re: where is rails? (debian 5.0.3)

2009-10-28 Thread Bruno Sousa
These ruby scripts differs from each other: /var/lib/gems/1.8/bin/rails /var/lib/gems/1.8/gems/rails-2.3.4/bin/rails Don't know why :( The first one gives me an error asking to install a gem. I installed fcgi, mongrel and i am still installing. I'm wondering why these were not installed by gem

[Rails] Re: where is rails? (debian 5.0.3)

2009-10-28 Thread Leonardo Mateo
On Wed, Oct 28, 2009 at 4:31 PM, Bruno Sousa wrote: > > I'm using Debian 5.0.3 . > Installed ruby1.8 + rubygems1.8 through aptitude. > Then executed gem install rails, no error messages. > But rails executable isn't there. What is happenning? Debian wont add the gems executables on the path. The

[Rails] page caching and world writable directories

2009-10-28 Thread Deb Prado
I turned on page caching for the index and show actions in a controller named "posts" in a blogging application. The caching path is set to tmp/cache As the pages get cached, the "/posts" directory created to hold the cached pages is world writable. Why is it being created with this permissions?

[Rails] where is rails? (debian 5.0.3)

2009-10-28 Thread Bruno Sousa
I'm using Debian 5.0.3 . Installed ruby1.8 + rubygems1.8 through aptitude. Then executed gem install rails, no error messages. But rails executable isn't there. What is happenning? regards Attachments: http://www.ruby-forum.com/attachment/4193/o.png -- Posted via http://www.ruby-forum.com/. -

[Rails] Specific routing problem

2009-10-28 Thread Carsten Gehling
I am implementing a system for users to easily create a small shop for themselves. And I've run into a route problem. NOTE: I've removed a lot from my route.rb file, since I want focus on this particular problem. :-) I currently have a route.rb like this: ActionController::Routing::Routes.draw

[Rails] GeoKit and Using :through associations

2009-10-28 Thread Peter Laurens
Hi, I am using Geokit, but I can't seem to properly limit the number of rows returned by GeoKit when I do something like this: Thing.find(:all, :origin => [...@home_city.lat, @home_city.lng], :within => 10, :limit => 20) Thing, actually doesn't have acts_as_mappable set on itself, because Thing

[Rails] Re: Using Cucumber with Lockdown

2009-10-28 Thread Damian Jones
Sorry, my bad, I just noticed that I wasn't logging the user in properly. It works now. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To pos

[Rails] range search syntax with xapian ?

2009-10-28 Thread Mecharek Massinissa
hey , am looking for xapian syntax to do a range search in my code i have class Table < AR acts_as_xapian :texts => [:title], :values => [[ :left, 0, "left", :number ],[ :right, 1, "right", :number ] ], :terms => [ [: left, 'L

[Rails] Re: paginate issues

2009-10-28 Thread Frederick Cheung
On Oct 28, 1:56 pm, RubyonRails_newbie wrote: > Hi there, > > I have managed to overcome my search issue, and now I am able to > return users successfully. > > I am now trying to paginate the results, so only 10 are displayed on > each page. > > The paginate example in the RailsSpace book doesn

[Rails] Re: multiple rails app with passenger on Debian

2009-10-28 Thread kitty00
Thanks! On Oct 27, 10:40 pm, Andrew Pace wrote: > Configuring virtual hosts can get tricky the first few times you do > it.  Slicehost has excellent articles on the subject.   > http://articles.slicehost.com. > I go there often.  Just look for the articles under your distro. > > Andrew --~--~---

[Rails] Re: multiple rails app with passenger on Debian

2009-10-28 Thread kitty00
I have only one hostname. On Oct 27, 4:11 pm, Norm Scherer wrote: > kitty00 wrote:I figured it out - about symlink. But it still does not work. > How do I access the different apps?Each virtual host needs a different > hostname and you access the different apps by going to the hostname.  All o

[Rails] Re: Adding SEARCH functionality to a website

2009-10-28 Thread Marnen Laibow-Koser
InventoryTrackers wrote: > I've been developing Rails apps now for about three years and I was > always mystified why there was no mainstream approach for running > searches against my models. > I didn't like the ferret and sphinx approaches as they create MONSTER > index files that have to be del

[Rails] Re: activerecord has_many vs. has_one scope

2009-10-28 Thread Chris Drappier
so, will we see this patch applied in 2.3.5? On Tue, Oct 27, 2009 at 8:26 PM, Matt Jones wrote: > > This was just fixed on September 28: > > https://rails.lighthouseapp.com/projects/8994/tickets/3088 > > --Matt Jones > > On Oct 27, 4:47 pm, Chris Drappier wrote: > > Hi All, > > > > in the api

[Rails] Re: rendering OUTSIDE request

2009-10-28 Thread Frantisek Psotka
NICE IDEA, thanks! if i use this approach, it will also break other limitations/inconsistenties. anyways, if someone knows, how to add layout-rendering capability (yield stuff) to my/your own code, i'am very curious Jeffrey L. Taylor wrote: > Quoting Frantisek Psotka : >> >> If there is somen

[Rails] Re: paginate issues

2009-10-28 Thread RubyonRails_newbie
is this the answer im looking for perhaps? http://api.rubyonrails.org/classes/ActionController/Pagination.html On 28 Oct, 13:56, RubyonRails_newbie wrote: > Hi there, > > I have managed to overcome my search issue, and now I am able to > return users successfully. > > I am now trying to paginat

[Rails] Re: Adding SEARCH functionality to a website

2009-10-28 Thread InventoryTrackers
I've been developing Rails apps now for about three years and I was always mystified why there was no mainstream approach for running searches against my models. I didn't like the ferret and sphinx approaches as they create MONSTER index files that have to be deleted from time to time with a CRON

[Rails] Re: Adding SEARCH functionality to a website

2009-10-28 Thread RubyonRails_newbie
thanks for the comments - i will look into these, and if need be, try sphinx. On 28 Oct, 06:12, Krishnaprasad Varma wrote: > Use sphinx instead of ferret > pat allan has written a beautiful plugin to incorporate sphinx > called thinking sphinx > i would advice you to use sphinx . > > On 10/28/09

[Rails] Re: rendering OUTSIDE request

2009-10-28 Thread Jeffrey L. Taylor
Quoting Frantisek Psotka : > > If there is somenthing like "render_to_string" - that you can use only > in controller. > You can use wget in a cronjob to invoke a controller request/method. If none of your users are on the same box, use local_request? method to block invocation by other means.

[Rails] paginate issues

2009-10-28 Thread RubyonRails_newbie
Hi there, I have managed to overcome my search issue, and now I am able to return users successfully. I am now trying to paginate the results, so only 10 are displayed on each page. The paginate example in the RailsSpace book doesn’t work in my version of rails (2.3.3). So – my question is: Ha

[Rails] Re: undefined method `^' for "e":String

2009-10-28 Thread Joe dude
Marnen Laibow-Koser wrote: > You don't need to create a new app. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org It really doesn't matter since I literally just began toying around with RoR. I already deleted the 2 sample apps I generated last night; they were

[Rails] Re: Rspec - In views

2009-10-28 Thread Robert Walker
Rails ROR wrote: > Hi All, > > I want to test my application with rspec. > > In order to test my views, I have written few specs as given in the > examples. > > Is there any way to test the user acceptance? > > i.e suppose the field takes a string. > > I want to test it for integers, float va

[Rails] Re: How to send a html email with attachment

2009-10-28 Thread Frantisek Psotka
something like: This is example procedure - assuming that i want to send few pdfs attached with a html email - this is ordinary mailer method class ExampleNotify < ActionMailer::Base def example(_user, _attachments) recipients _user.email fromFROM subject 'example'

[Rails] Re: Using multiple databases

2009-10-28 Thread Marnen Laibow-Koser
dare ruby wrote: > Dear Frienz, > > In one of my project i need to implement archiving of logs. > > I have two database called people_development and archive_development. I > have used all my development in people_development database. > > development: > adapter: mysql > database: people_de

[Rails] Re: How to start server for site with no /script/server/ script?

2009-10-28 Thread Rick
The first thing you should check is that the version of Rails you have installed is the version your target application (the one you're trying to migrate) is expecting to use. 1) "rails --version" will tell you what you've got installed. 2) target_app/config/environment.rb will have a line like:

[Rails] Re: rendering OUTSIDE request

2009-10-28 Thread Frantisek Psotka
If there is somenthing like "render_to_string" - that you can use only in controller. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post t

[Rails] Re: undefined method `^' for "e":String

2009-10-28 Thread Marnen Laibow-Koser
Joe dude wrote: > C K Kashyap wrote: >> Check out this link - >> https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234 >> >> There is a bug in rails 2.3.4 ... that throws the same errors you are >> mentioning. >> >> >> -- >> Regards, >> Kashyap > > Well

[Rails] Re: Rspec - In views

2009-10-28 Thread Marnen Laibow-Koser
Rails ROR wrote: > Hi, > > Example if the view has a form with few fields and a submit button, I > want > to test whether the data that i enter is according to the database,i.e > the > model(Having all validations[Null]) and the page gets redirected to > success > page. Views are dumb. What

[Rails] Re: Rspec - In views

2009-10-28 Thread Rails ROR
Hi, Example if the view has a form with few fields and a submit button, I want to test whether the data that i enter is according to the database,i.e the model(Having all validations[Null]) and the page gets redirected to success page. For Example: require 'spec_helper' describe "/admin/books/n

[Rails] Re: Re-tasking destroy contoller action...is this bad practi

2009-10-28 Thread Marnen Laibow-Koser
Lee Smith wrote: > Yeah, I started to install acts_as_paranoid but I read that it's not > really updated anymore and may not even work with newer versions of > Rails? Huh? The repository on Github was last updated in April 2009. > I also looked at a revamped version of acts_as_paranoid called

[Rails] Ajax Pagination

2009-10-28 Thread Rails ROR
Hi Everybody, I want to implement pagination with ajax. I followed this url: http://wiki.github.com/mislav/will_paginate/ajax-pagination I am getting the page results. But when i click on the next or 2,3 i am just getting the spinner but not the record. Please give me a good example for pa

[Rails] Using Cucumber with Lockdown

2009-10-28 Thread Damian Jones
Has anyone had any issues using Cucumber with Lockdown. in the following scenario, I am logged in as an admin and so should have :all access rights, however I get the following error. Authoriztion filed! prms: {"action"=>"index", "controller"=>"admin"} session: {:expiry_time=>Wed Oct 28 13:33:43

[Rails] Re: undefined method `^' for "e":String

2009-10-28 Thread Joe dude
C K Kashyap wrote: > Check out this link - > https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234 > > There is a bug in rails 2.3.4 ... that throws the same errors you are > mentioning. > > > -- > Regards, > Kashyap Well I figured out how to apply this

[Rails] Re: rendering OUTSIDE request

2009-10-28 Thread Frantisek Psotka
one more time :) def return_string_to_me_baby(template, assigns={}) x = ActionView::Base.new(['app/views']) # assign template variables assigns.each do |k,v| x.assigns[k] = v end x.render template end -- Posted via http://www.ruby-forum.com/. --~--~-~--~

[Rails] rendering OUTSIDE request

2009-10-28 Thread Frantisek Psotka
Hello, I need to render erb template WITH LAYOUT OUTSIDE REQUEST, for example to generate document in background process. How can I do this? I know that I can do ActionView::Base.new ... but its possible to have also layout? Code w/o layout support: def return_string_to_me_baby x = Action

[Rails] Basic Authentication within a POST-request using HTTPClient

2009-10-28 Thread onomato
Hey, I want to call a service with HTTPpost behind a BasicAuth using HTTPClient like this: client = HTTPClient.new body = { ... } client.set_auth(domain, user, password) client.post (domain, body) Receive a 401! If I try it with GET, it's perfectly working, so I know the user/ password is correc

[Rails] Re: Unwanted call to validates_associated

2009-10-28 Thread Saurabh Peshkar
Max Williams wrote: > Thanks, but that's a workaround, and a rather complex one at that. I'd > rather understand why this is happening. Hi Max, I'm a newbie, not having much idea, still learning, So i used that workaround. Regards Saurabh -- Posted via http://www.ruby-forum.com/. --~--~---

[Rails] Re: MySQL sometime fail to record timestamps, become NULL.

2009-10-28 Thread Masuda
Hi Fred. >Have you been able to narrow down the problem to a small example ? No I haven't. I have no idea about this problem yet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post

[Rails] Re: Unwanted call to validates_associated

2009-10-28 Thread Max Williams
Thanks, but that's a workaround, and a rather complex one at that. I'd rather understand why this is happening. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] Re: Contacts gem is not fetching the Gmail a/c contacts.

2009-10-28 Thread Sathish Kumar
Hi Saideed, Thanks for your comment here. I have checked too... Gmail and hotmail too changed some protocols or their secure way of authentication or as you said arguments. Actually, I was dogged into that issue after posting this, In Gmail, There is something called GALX parameter which one'

[Rails] Re: Unwanted call to validates_associated

2009-10-28 Thread Saurabh Peshkar
Max Williams wrote: > Hi Saurabh > > Yes, it does seem that the "Answers is not valid" error message is > default, in the sense that nothing that i am doing is causing it, and > i'd like to remove it as you say. The fact that the error message is > identical to what i would get from "validate

[Rails] Remove all cached data using a single statement...

2009-10-28 Thread Usman Ali
on this forum lot of people calling controller methods in rake task to remove cache some one trying to remove directories to and sub directories for removing cached content... this statement can be used as cron job "rake tmp:cache:clear" this statement will remove all cached content of any type o

  1   2   >