[Rails] Re: Can rails environments be loaded only once and then execute rake tasks without loading it again and again?

2009-05-01 Thread Phlip
Canvas wrote: > I have a daemon that executes a rake task periodically in a loop in > the backend. And every time it runs the rake task, rails environment > is reloaded. Is there a way that the rails environment is loaded only > once before the loop and the following rake task will not load it >

[Rails] Re: collection_select default selected value

2009-05-01 Thread Ricla Semon
Martin is right, but would like to add a comment. If you do <%= select_tag 'my[select]', options_from_collection_for_select(Model.find(:all),'id','name',some_string) %> Then you do need to pass some_string as string. However, if you are passing symbols, the you would need to convert to the sym

[Rails] Re: Valid hashed passwords

2009-05-01 Thread Gavin
Gottit - thank you both for clearing that up --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from th

[Rails] Re: attachment_fu inside a form for a different model

2009-05-01 Thread Tarun Kothuri
Thanks a lot.. I was searching for the exact same thing... But if you are using this form for creating a New file upload, you have to instantiate the nested object too. example - for the code given above > > <% form_for @music_service, :html => {:multipart => true}) do |f| %> >... > <% f

[Rails] Re: upgrading to 2.3

2009-05-01 Thread Brendon
Sounds like you did the freeze as root. That's not a very good idea. On May 1, 8:29 am, ih wrote: > That worked, thanks.  I thought unfreeze was doing it, but I did not > check and it turns out I needed to have super user permission. > > On May 1, 10:22 am, Colin Law wrote: > > > Check there i

[Rails] Re: How to do select with sum?

2009-05-01 Thread Steve Shepherd
I am interested in this also. Sorry don't have any ideas as I am to new to RoR myself On Fri, May 1, 2009 at 7:32 PM, miga wrote: > > Is there a way to rewrite the following Model method avoiding > connection.select? > > class LineOrder < ActivateRecord::Base > belongs_to :auction > belongs_to

[Rails] Re: polymorphic -> polymorphic relations

2009-05-01 Thread Steve Shepherd
Try This: class Company < ActiveRecord::Base belongs_to :business, :polymorphic => true has_many :people has_and_belongs_to_many :mops end class Person < ActiveRecord::Base belongs_to :contactable, :polymorphic => true belongs_to :company end class Contractorco

[Rails] Re: RESTful User Registration

2009-05-01 Thread Steve Shepherd
If you are interested in a complete system that also handles payment from your users you could try RailsKit - Subscription code. Its not free and I am only a customer but it is very comprehensive for setting up a Saas (Software as a Service) website. On Sat, May 2, 2009 at 11:16 AM, srj wrote:

[Rails] Re: Problem with button_to_remote on 2.3.2

2009-05-01 Thread Steve Shepherd
'Where is the button problem? Steve Shepherd Mob:+64 (0) 27 4338154 Email: sargs...@gmail.com Analyst On Fri, May 1, 2009 at 4:12 PM, Eddie Ridwan < rails-mailing-l...@andreas-s.net> wrote: > > I have a link_to_remote call which works as expected: ><%= link_to_remo

[Rails] Re: Valid hashed passwords

2009-05-01 Thread Brendon
Don't store the plain text and the hashed password in the same column. Create the methods for the plain text password in your model and store the hashed (and salted and stretched I hope) value in the database. Then fix your validation, since the model should be checking the password before hashi

[Rails] Re: Exception notifier and rails 2.3, does it work?

2009-05-01 Thread Darren
I'm seeing a similar problem, which started happening around the time we upgraded to Rails 2.3. Have you tried logging into the console, and doing... >> ExceptionNotifier.exception_recipients => [] That is what mine looks like. I.e., the recipients are gone. However, I fixed this by changing

[Rails] Re: RESTful User Registration

2009-05-01 Thread srj
Thanks for the tutorials - That is what I need because the books I have read so far are good, but a little too basic for what I am trying. On May 1, 5:35 pm, Chris Hanks wrote: > These tutorials will show you how to set up a user > registration/authentication system with Authlogic, and then to s

[Rails] Re: Automatically delete oldest post of a specified tag

2009-05-01 Thread Victor Vlist
Anyone? -- 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 to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe fr

[Rails] Re: Where can I find Ruby on Rails work?

2009-05-01 Thread David Beckwith
By the way, I'm mainly looking for projects, but I'm open to full-time work as well. I'm in the Bay Area, but willing to relocate. Here is my updated resume in case anybody is interested: http://docs.google.com/Doc?id=dfzm4jm5_0c8xs2cgx David :) On May 1, 2:05 pm, David Beckwith wrote: > He

[Rails] Re: Restful_authentication doesn't work in Rails 2.3.2

2009-05-01 Thread Sam Kong
Matt Jones wrote: > Yep, you're seeing an incompatibility - I think 2.1.2 was the first > version of Passenger that worked with Rails 2.3.2. > > --Matt Jones Yes, you're right. I complained to DreamHost and surprisingly they moved my account to a newer server which has Passenger 2.2.1. Thanks

[Rails] Re: Restful_authentication doesn't work in Rails 2.3.2

2009-05-01 Thread Matt Jones
Yep, you're seeing an incompatibility - I think 2.1.2 was the first version of Passenger that worked with Rails 2.3.2. --Matt Jones On Apr 30, 1:11 pm, Sam Kong wrote: > Hi, > > I'm using restful_authentication on rails 2.3.2. > It works find on my local machine which has passenger 2.1.2. > But

[Rails] Re: Layout antics

2009-05-01 Thread dwormuth
The hard coded url fixed the problem. I'll try the stylesheet_link tag next. I'd really like to understand why the layout works for some controller/actions and not for others. Thanks for the help Dave On May 1, 12:43 pm, Marnen Laibow-Koser wrote: > Matt Harrison wrote: > > [...] > > > I'd try

[Rails] Re: Can't get to an action in a RESTful controller

2009-05-01 Thread Sj Tib
Thanks Colin. I looked into it more and found a bug. I can get to the resetpwd action in the Users controller now. Chris's routing change suggestion resolved the issue. -S -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: Where can I find Ruby on Rails work?

2009-05-01 Thread Charles Johnson
http://is.gd/vXH3 Cheers-- Charles On Fri, May 1, 2009 at 4:05 PM, David Beckwith wrote: > > Hello, > Where can I find Ruby on Rails work? I have about 2 years of > experience with Ruby/Ruby on Rails and I've taught classes in Ruby and > Ruby on Rails. I just moved back to America from overse

[Rails] RESTful User Registration

2009-05-01 Thread srj
I would like to create a website that will require users to Register. There will be a three step registration process - the user will click "Register" on the home page, and that will take them to Registration Page 1 where they will enter all the required fields (name, email, user ID & password,

[Rails] Re: RESTful User Registration

2009-05-01 Thread Chris Hanks
These tutorials will show you how to set up a user registration/authentication system with Authlogic, and then to set up a password reset system. It'll give you a good start on a RESTful setup, which you can then tweak however you like. http://github.com/binarylogic/authlogic_example/tree/mas

[Rails] Where can I find Ruby on Rails work?

2009-05-01 Thread David Beckwith
Hello, Where can I find Ruby on Rails work? I have about 2 years of experience with Ruby/Ruby on Rails and I've taught classes in Ruby and Ruby on Rails. I just moved back to America from overseas, so I don't really know where to find work. Does anybody have any ideas? Thank you, David :)

[Rails] Re: How do i stop rails from cacheing a link

2009-05-01 Thread Robert Walker
Morgan Morgan wrote: > now i'm assuming this is rails wanting to be nice and cache stuff to > make it quicker... but it's annoying the hell out of me. I'm guessing you're assuming wrong here. Rails has nothing to do with it. It's going to be the client's browser that caches the file, unless the

[Rails] Re: Valid hashed passwords

2009-05-01 Thread Robert Walker
Gavin Morrice wrote: > Hey all - just wanted to check if I'm going about this in the right > way... > > I have class User, user has a password > > Password should only be valid if it's between 6 and 16 chars in > length. Fist of all, don't limit the length of a user's password. At least not do

[Rails] Re: Problem with dynamic selects

2009-05-01 Thread Bradley Herman
Okay I solved that, partially. I needed to pass :locals => {:form => form} from my view when first rendering the partial. The problem is, though, that on the :onchange event, the partial is rendered through the controller, so I can't pass :locals from there. So after the :onchange event, I

[Rails] Re: ActiveRecord::Base.establish_connection loads once?

2009-05-01 Thread pepe
Hi, I've never done what you are trying but my understanding is that every time that your code executes it opens a new connection to the database. I just looked at establish_connection's code and it doesn't seem to check if there is an existing connection matching the parameters passed. I could b

[Rails] Re: how to disable auto-increment in primary key.

2009-05-01 Thread Robert Walker
Vipin wrote: > How can i disable the auto-increment for a primary key data type. The > purpose of using primary_key data type is using different name for > primary key. But we still want to use all the properties of "id" > except for auto increment part. Given that it looks to me like you want t

[Rails] Re: Can't get to an action in a RESTful controller

2009-05-01 Thread Colin Law
Are you sure it is not correctly going to UsersController#resetpwd then getting redirected by the action? 2009/5/1 Sj Tib > > That was a useful link Chris - thanks for sharing. I changed the entry > in routes.rb as you suggested to > > map.resources :users, :collection => { :resetpwd => :get }

[Rails] Re: Problem with dynamic selects

2009-05-01 Thread Bradley Herman
gaurav v bagga wrote: > Hi, > can you verify parameters to collection_select. Are they proper? > > Regards, > gaurav > > On May 1, 2:19�pm, Bradley Herman After doing some testing, it would appear Rails is just having a major problem with my partial. The parameters are fine, but something ab

[Rails] Re: Can a moderator check my message?

2009-05-01 Thread Ahad Amdani
Frederick Cheung wrote: > On May 1, 7:55�pm, "Ahad L. Amdani" wrote: >> Oh, well then. That's terrible - so I'll see it when I first receive a >> reply? >> > you can check on the google groups page to see if it has appeared yet. > Message approval is only to do with keeping out spammers, but if i

[Rails] Job: Ruby on Rails Developer-Full Time-NYC,NY

2009-05-01 Thread Jai
Hi , Hope you are doing good !! I have requirement for Ruby on Rails Developer, Let me know if you are interested on it. Kindly send me the updated resume along with contact details and salary for the following position ASAP. Job Description: Ruby on Rails Developer Location: NYC, NY Term: Dir

[Rails] Re: Can a moderator check my message?

2009-05-01 Thread Frederick Cheung
On May 1, 7:55 pm, "Ahad L. Amdani" wrote: > Oh, well then. That's terrible - so I'll see it when I first receive a > reply? > you can check on the google groups page to see if it has appeared yet. Message approval is only to do with keeping out spammers, but if it's at a time when I'm in bed o

[Rails] Re: Can a moderator check my message?

2009-05-01 Thread Ahad L. Amdani
Oh, well then. That's terrible - so I'll see it when I first receive a reply? On May 1, 2:50 am, "Simon Macneall" wrote: > You won't see your message. > > gmail has this lovely thing where it sees your message in the outbox, so > doesn't show you it when it is received again from the list. > >

[Rails] Re: is possbile limit the number of object in has_many option?

2009-05-01 Thread Rob Biedenharn
On May 1, 2009, at 9:32 AM, Chris Bird wrote: > has_one does indeed mean has a maximum of one. The belongs_to side > means has exactly one. > > I don't know (because I never tried it) what happens if you put > "belongs_to on both sides - i.e. make something exactly 1:1. Obviously > not relevant in

[Rails] Re: SQL joins question

2009-05-01 Thread Frederick Cheung
On May 1, 5:55 pm, Stephen Fagan wrote: > I want to link up 3 tables to list all members of a particular group. My > code (which is wrong) looks like this: > > @group_members = Membership.find( :all, >                                   :joins => ['FROM memberships INNER > JOIN groups ON members

[Rails] Re: form.collection_select utilizing CONSTANT string array?

2009-05-01 Thread Coondog
Hi Matt- Thanks much -- qualifying fixed it. <%= f.select( :title, Contact::TITLES, { :prompt => true } ) %> Really appreciate the quick tip- --Jeff On Apr 26, 8:24 am, Matt Jones wrote: > The containing module for the ERB code isn't the model or the > controller, it's part of ActionV

[Rails] Re: CookieStore and setting an expiration

2009-05-01 Thread E. Litwin
cookies[:key] = {:value => value, :expires => 3.weeks.from_now} On May 1, 9:41 am, etienne wrote: > hi everyone, > > i can't seem to find any help online for this.  I'm using > CookieStore.  What I can't seem to figure out how to do is set the > expiration for the cookie set by CookieStore.  Rig

[Rails] Using nested model forms with polymorphic associations

2009-05-01 Thread Chris Hanks
Hello - Sorry if this is long - I'm erring on the side of giving too much information rather than too little. Hopefully it'll appear organized and easy to skim. In a nutshell, I'm making a site where people can put together online tutorials. Each tutorial is broken up into sections, and there ar

[Rails] Re: "gem install mysql" fails

2009-05-01 Thread cmyk
I am having the exact same issue. Any solutions yet? On Apr 7, 11:43 pm, Greg Donald wrote: > On Mon, Apr 6, 2009 at 5:00 PM, Frederick Cheung > > wrote: > > I think version.h disappeared in ruby 1.9. Looks like it's trying to > > build a version of the mysql gem that isn't compatible with ruby

[Rails] Who Are We? Research Survey - Thanks!!

2009-05-01 Thread airmont
Hi Ruby on Rails: Talk, Thank you so much for your time and consideration. I am a graduate student at Georgian Court University (Lakewood, NJ) conducting a study titled “Who Are We?” examining the relationship between social identity and psychological well-being. Your group, Ruby on Rails: Talk,

[Rails] CookieStore and setting an expiration

2009-05-01 Thread etienne
hi everyone, i can't seem to find any help online for this. I'm using CookieStore. What I can't seem to figure out how to do is set the expiration for the cookie set by CookieStore. Right now it leaves that field blank, meaning that the cookie expires when the browser is closed. The context

[Rails] Re: SQL joins question

2009-05-01 Thread Sj Tib
I don't know the answer but something that jumped out at me was that you don't have a space in between "group.idINNER". You may want to try it with something like :joins => ['FROM memberships INNER JOIN groups ON memberships.group_id= group.id' + ' INNER JOIN users ON memberships.user_id=users

[Rails] Re: SQL joins question

2009-05-01 Thread E. Litwin
Do you have a space between group.idINNER JOIN users? In your code and log file, it looks like the space is missing. On May 1, 9:55 am, Stephen Fagan wrote: > I want to link up 3 tables to list all members of a particular group. My > code (which is wrong) looks like this: > > @group_members = Me

[Rails] Re: Can't get to an action in a RESTful controller

2009-05-01 Thread Sj Tib
That was a useful link Chris - thanks for sharing. I changed the entry in routes.rb as you suggested to map.resources :users, :collection => { :resetpwd => :get } When I print out the possible routes in script/console I get the following (relevant subset) GET/users/resetpwd/

[Rails] SQL joins question

2009-05-01 Thread Stephen Fagan
I want to link up 3 tables to list all members of a particular group. My code (which is wrong) looks like this: @group_members = Membership.find( :all, :joins => ['FROM memberships INNER JOIN groups ON memberships.group_id= group.id' + 'INNER JOIN users ON member

[Rails] polymorphic -> polymorphic relations

2009-05-01 Thread Me
I have 2 polymorphic models that I am trying to relate to each other: class Company < ActiveRecord::Base belongs_to :business, :polymorphic => true has_many :people has_and_belongs_to_many :mops end class Person < ActiveRecord::Base belongs_to :contactable, :polym

[Rails] Re: Layout antics

2009-05-01 Thread Marnen Laibow-Koser
Matt Harrison wrote: [...] > I'd try using an absolute path i.e: "/css/menu.css" > > HTH > > ~Matt Better yet, use stylesheet_link_tag -- that way Rails will construct the proper path and save you some typing. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via

[Rails] Re: how to combine SQL queries in self.up

2009-05-01 Thread pharrington
well... I assume you're using a MySQL DB; If that is the case you actually need to specify specific options when connecting to the server to allow multiple queries in one statement. I've honestly never played with that before, but http://dev.mysql.com/doc/refman/5.0/en/c-api-multiple-queries.htm

[Rails] Re: Layout antics

2009-05-01 Thread Matt Harrison
dwormuth wrote: > I have a strange problem with my layout file. I think it may be due to > nested partials, but removing the deepest nested partial call does not > clear the problem. > > I have an application wide layout (application.html.erb) that works as > expected - loads images, javascript,

[Rails] Re: Redirecting from a View

2009-05-01 Thread Hassan Schroeder
On Fri, May 1, 2009 at 8:30 AM, djolley wrote: > A lot of bytes have been spilled over the issue of how much logic > should be put in the view.  I am now coming to the conclusion that > it's a whole lot less than I had previously thought.  In fact, I am > fast becoming of the opinion that it's p

[Rails] Re: ordering by join table - is this possible?

2009-05-01 Thread Gavin
^^ I should add Is it possible to do this in one SQL query? Thanks On May 1, 4:55 pm, Gavin wrote: > Hey all > > Suppose Post has many comments. > > Is it possible to call Post.all and order them by the number of > comments each has without adding a column 'comments_count' to the Post > table?

[Rails] Re: problem with nil.user

2009-05-01 Thread Stephen Fagan
E. Litwin wrote: > Just to clarify - are you setting session[:user_id] in the user.login! > (session) call? > The other suggestions on handling a nil session[:user_id] (i.e. using > find_by_id) are the appropriate ways to handle the error. > > Eric > > On Apr 30, 12:09�pm, Stephen Fagan Yes,

[Rails] Re: Ruby on Rails Certification

2009-05-01 Thread Fernando Perez
Stick on your resume the URL of your github or open source projects' page and rails related blog, that's worth any certification. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

[Rails] ordering by join table - is this possible?

2009-05-01 Thread Gavin
Hey all Suppose Post has many comments. Is it possible to call Post.all and order them by the number of comments each has without adding a column 'comments_count' to the Post table? If not, can anyone think of a nicer way of doing it this than: def Post.order_by_comments posts = Post.all

[Rails] Re: Redirecting from a View

2009-05-01 Thread Chris Hanks
You don't want to cram too much into your controllers either. The design philosophy is "skinny controllers, fat models." http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You receiv

[Rails] Re: Redirecting from a View

2009-05-01 Thread djolley
> This sounds messy. Views should be dumb data displayers, not making > decisions about whether to redirect or not. What are you trying to > do ? You know what, Fred? You're absolutely right. I thought about it over night and that's the exact conclusion I came to. If one feels a need to re-dir

[Rails] Re: upgrading to 2.3

2009-05-01 Thread ih
That worked, thanks. I thought unfreeze was doing it, but I did not check and it turns out I needed to have super user permission. On May 1, 10:22 am, Colin Law wrote: > Check there is not a rails folder in vendor. If there is, delete it. > > 2009/5/1 ih > > > > > I'm having trouble upgrading

[Rails] Re: upgrading to 2.3

2009-05-01 Thread Colin Law
Check there is not a rails folder in vendor. If there is, delete it. 2009/5/1 ih > > I'm having trouble upgrading my app from rails 2.2.2 to 2.3.2. I've > successfully installed the 2.3.2 gem (when I type 'rails -v' i get > "Rails 2.3.2") and I've changed the environment.rb file to use 2.3.2, >

[Rails] Graticule / acts_as_geocodable error?

2009-05-01 Thread Scott
Has anyone encountered this error using Graticule & acts_as_geocodable? ActiveRecord::UnknownAttributeError (unknown attribute: precision): (__DELEGATION__):2:in `__send__' (__DELEGATION__):2:in `with_scope' app/models/listing.rb:113:in `advanced_find' ... Here is line 113 in listing.rb:

[Rails] Re: Ruby on Rails Certification

2009-05-01 Thread Sazima
Or you o can take a practical approach, write software, show results! Perhaps contribute to the rails community with a plugin or something. Cheers, Sazima On Apr 30, 11:16 pm, shusseina wrote: > Is there any Ruby on Rails certification available for RoR developers? > > I am thinking of getting

[Rails] Re: Exception notifier and rails 2.3, does it work?

2009-05-01 Thread fausto
On 1 Mag, 02:23, Andrew Bloom wrote: > Very strange. Have you checked postfix at all? I use ExceptionNotifier > in 2.3 with no problems at all. yep, there nothing in the log, as rails never pass it to send the mail at the moment of the error (a simple find with a wrong id which thrown an excepti

[Rails] upgrading to 2.3

2009-05-01 Thread ih
I'm having trouble upgrading my app from rails 2.2.2 to 2.3.2. I've successfully installed the 2.3.2 gem (when I type 'rails -v' i get "Rails 2.3.2") and I've changed the environment.rb file to use 2.3.2, but 'rake rails:update' doesn't seem to do anything and when I try to run script/about it s

[Rails] Re: Posting a form from Rails programatically

2009-05-01 Thread Neil
I've tried a 307, which seems to work with Firefox (with a warning, as you say), but Safari (4) seems to miss the re-post. I've not checked IE, as I've not got a copy to hand. Neil On May 1, 2:42 pm, Olek wrote: > > I should add that I want to redirect the user out to the third party > > with

[Rails] Re: MacVim and rails.vim not working

2009-05-01 Thread Wang Pengcheng
cd ~ ls -R .vim/ -- .vim/: autoload doc history plugin .vim/autoload: dbext_dbi.vim dbext.vim rails.vim .vim/doc: dbext_gpl.dat project.txt surround.txt tags dbext.txt rails.t

[Rails] Re: Posting a form from Rails programatically

2009-05-01 Thread Olek
> I should add that I want to redirect the user out to the third party > with the form too.  Essentially I want it to appear to the user that > they've submitted the form to the third party directly. You can either use an HTTP 307 response (http://www.w3.org/Protocols/ rfc2616/rfc2616-sec10.html#

[Rails] Re: is possbile limit the number of object in has_many option?

2009-05-01 Thread Chris Bird
has_one does indeed mean has a maximum of one. The belongs_to side means has exactly one. I don't know (because I never tried it) wjay happens if you put "belongs_to on both sides - i.e. make something exactly 1:1. Obviously not relevant in this case, but I could see situations where for performa

[Rails] Re: model

2009-05-01 Thread Phlip
> I am getting 'MySQL gone away' > error while creating a new object of this subclass. Refactor the common code between your tabled and table-less *models into a module, and let both models include that module. *yes, it's still a model, even if it has no DB persistence. -- Phlip http://

[Rails] Re: Create Log-in and Log-out

2009-05-01 Thread Robert Walker
Anup Isvanlal wrote: > I have an assesment to complete, i've done all the pages including > customer details but i have to create log-in for the customer, could > anyone help me please. Install restful_authentication, follow the easy and clear instructions. Done! :) http://github.com/technoween

[Rails] Create Log-in and Log-out

2009-05-01 Thread Anup Isvanlal
I have an assesment to complete, i've done all the pages including customer details but i have to create log-in for the customer, could anyone help me please. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] [ANN] Lone Star Ruby Conference 2009 Talk Submission Deadline

2009-05-01 Thread jimfreeze
Hello This is friendly reminder about the speaker submission deadline. The deadline is Sunday, May 3 at midnight. We have extended it one day to give you the weekend to submit your proposal. If you plan on submitting a proposal, please use the link below. We look forward to seeing you at the

[Rails] Re: How to make << 123.. >> functionality ? %)

2009-05-01 Thread Sergio Footenko
omg, it works ! Thank you very much ! -- 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 to this group, send email to rubyonrails-talk@goog

[Rails] Re: How to make << 123.. >> functionality ? %)

2009-05-01 Thread Frederick Cheung
On May 1, 1:20 pm, Sergio Footenko wrote: > Hello. > >  I have read all great documentation which recomended me at this forum, > thanks, it is really very good start for my. > >  Now I try to create blog. I have one problem, pages looks very bad if > many than 40 items on one page displayed =)

[Rails] sanitize_params + whiteList

2009-05-01 Thread Petan Cert
Hi all, I just installed whiteList and sanitize_params plugins to get rid of with some bad html tags . Put in my environment.rb: config.plugins = [:white_list, :sanitize_params, :all] and in application.rb: before_filter :sanitize_params add ok tags to config/initializers/whitelist_conf.rb

[Rails] Re: Ruby on Rails Certification

2009-05-01 Thread Gregory Seidman
On Thu, Apr 30, 2009 at 07:16:45PM -0700, shusseina wrote: > Is there any Ruby on Rails certification available for RoR developers? > > I am thinking of getting into RoR development, but would like to get > certified if possible so I have something to stick on my resume. No respected Rails certi

[Rails] How to make << 123.. >> functionality ? %)

2009-05-01 Thread Sergio Footenko
Hello. I have read all great documentation which recomended me at this forum, thanks, it is really very good start for my. Now I try to create blog. I have one problem, pages looks very bad if many than 40 items on one page displayed =) , I think need create something similar to "next|prev pag

[Rails] Sending Bulk SMS

2009-05-01 Thread dinesh
Hi, I am trying to send bulk sms using sms_client using GSM/GPRS ANALOGIC MODEM . Below is the log file - MODEM: Toggle DTR 100 Microseconds MODEM: Toggle DTR 100 Microseconds MDM_send: Drain required. WARNING

[Rails] Valid hashed passwords

2009-05-01 Thread Gavin
Hey all - just wanted to check if I'm going about this in the right way... I have class User, user has a password Password should only be valid if it's between 6 and 16 chars in length. New user is created if everything is valid and it's stored to the db. After saving to the database, the pass

[Rails] Re: n:m relationship, joining table record creation issue

2009-05-01 Thread Frederick Cheung
On Apr 30, 10:24 pm, "Ahad L. Amdani" wrote: > > So, my questions are as follows: > 1. How do I have the submit button go to the "Set" action defined in > the practices_controller? by default this form would submit to the update (if the record existed) or create (if it didn't) url for that pr

[Rails] Layout antics

2009-05-01 Thread dwormuth
I have a strange problem with my layout file. I think it may be due to nested partials, but removing the deepest nested partial call does not clear the problem. I have an application wide layout (application.html.erb) that works as expected - loads images, javascript, css etc for my application.

[Rails] Re: Optimizing OR Queries in Rails and MySQL

2009-05-01 Thread Frederick Cheung
On May 1, 10:38 am, Moodang wrote: > According to MySQL doc, I must use union and temporary tables. > > It seems I have to do something along the line of this: > > http://www.ricroberts.com/articles/2007/09/25/mysql-temporary-tables-... > > There are cases where I use OR queries quite often. I

[Rails] Optimizing OR Queries in Rails and MySQL

2009-05-01 Thread Moodang
According to MySQL doc, I must use union and temporary tables. It seems I have to do something along the line of this: http://www.ricroberts.com/articles/2007/09/25/mysql-temporary-tables-and-rails There are cases where I use OR queries quite often. I am talking about queries like this "where c

[Rails] Re: Problem with dynamic selects

2009-05-01 Thread gaurav v bagga
Hi, can you verify parameters to collection_select. Are they proper? Regards, gaurav On May 1, 2:19 pm, Bradley Herman wrote: > I'm trying to create dynamic select menus for my application.  I have a > partial that is rendered by an action in my site controller after an > :onchange event is tri

[Rails] Re: button_to_remote problem on 2.3.2

2009-05-01 Thread Eddie Ridwan
Dmitry Sokurenko wrote: > Definetely it won't work, just because standalone buttons should not > do anything when javascript is disabled. That's by design. > > Dmitry So it appears. button_to_remote generates the code: which would not recognise the href. I was lulled by the description in

[Rails] Re: button_to_remote problem on 2.3.2

2009-05-01 Thread Dmitry Sokurenko
Definetely it won't work, just because standalone buttons should not do anything when javascript is disabled. That's by design. Dmitry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To p

[Rails] Re: Change default index page

2009-05-01 Thread Dmitry Sokurenko
Not sure that the previous solution will work. If the page is dynamic then, point root to the right controller and action. map.root :controller => 'yourcontroller', :action => 'youraction' If it's static then you'll better think twice if you need it, and if you realy need then try one of the f

[Rails] Problem with dynamic selects

2009-05-01 Thread Bradley Herman
I'm trying to create dynamic select menus for my application. I have a partial that is rendered by an action in my site controller after an :onchange event is triggered. I'll post the three pieces of code and the error I keep getting. *_models.html.haml* - if models = collection_select :model

[Rails] Re: Making a link to a User profile

2009-05-01 Thread Sean Six
The profile/(screen_name) path works find on its own. When I try to use in it the blog controller I get problems. I defined the profile_for in a helper file and included the helper in the appropriate controller. def profile_for(user) profile_url(:screen_name => user.screen_name) end When

[Rails] Re: Change default index page

2009-05-01 Thread Shaun Keller
Jacob Yong wrote: > Hello, > Not sure if anyone can help me here. I have a page which I want to > make it the index page. > > The page is http://www.myweb.com:3000/bin/myindex.mxml. > > Yes, you can probably tell it's a Adobe Flex component - myindex.mxml. > I'm combining Flex and RubyOnRa

[Rails] Change default index page

2009-05-01 Thread Jacob Yong
Hello, Not sure if anyone can help me here. I have a page which I want to make it the index page. The page is http://www.myweb.com:3000/bin/myindex.mxml. Yes, you can probably tell it's a Adobe Flex component - myindex.mxml. I'm combining Flex and RubyOnRails. My question is: Is there a

[Rails] Re: model

2009-05-01 Thread Frederick Cheung
On May 1, 7:09 am, Amita Bhatkhande wrote: > Hi, > > Should every model have an associated table in database? I have a model > as a subclass of another model class. not necessarily. For example when using single table inheritance then a model and its subclasses will share a table, and you can

[Rails] Re: button_to_remote problem on 2.3.2

2009-05-01 Thread Frederick Cheung
On May 1, 5:17 am, Eddie Ridwan wrote: > Sorry about the previous aborted post.. Here is the full post. > > I have a link_to_remote call that works as expected (using Rails 2.3.2): > > <%= link_to_remote "-", { :url => { :action => :remove_from_cart, :id => > cart_item.product} }, { :href => ur

[Rails] Re: Can a moderator check my message?

2009-05-01 Thread Simon Macneall
You won't see your message. gmail has this lovely thing where it sees your message in the outbox, so doesn't show you it when it is received again from the list. caught me out the first time I tried posting :) Simon On Fri, 01 May 2009 07:28:04 +0800, Ahad L. Amdani wrote: > > I posted a

[Rails] Re: Redirecting from a View

2009-05-01 Thread Frederick Cheung
On May 1, 6:24 am, doug wrote: > I'd sure like to be able to insert a redirect_to within a rescue > clause of a view.  Anyone have any ideas how I might be able to do > that?  Thanks for any input. > >           ... doug This sounds messy. Views should be dumb data displayers, not making decis

[Rails] How to do select with sum?

2009-05-01 Thread miga
Is there a way to rewrite the following Model method avoiding connection.select? class LineOrder < ActivateRecord::Base belongs_to :auction belongs_to :operation ... def self.amounts_by_year(search) search_company = "" if search search_company = "inner join auctions on line_orders.aucti

[Rails] Ruby on Rails Certification

2009-05-01 Thread shusseina
Is there any Ruby on Rails certification available for RoR developers? I am thinking of getting into RoR development, but would like to get certified if possible so I have something to stick on my resume. Thanks --~--~-~--~~~---~--~~ You received this message bec

[Rails] n:m relationship, joining table record creation issue

2009-05-01 Thread Ahad L. Amdani
Hey all, I have an n:m relationship between lpl_short_form_apps and practice_areas. The joining table is called practices. The definitions are as follows (minus validation/business logic): LPLSFAs Model: class LPLShortFormApp < ActiveRecord::Base has_many :practices has_many :practice_areas,

[Rails] Can a moderator check my message?

2009-05-01 Thread Ahad L. Amdani
I posted a message but I still don't see it posting yet. I was wondering how long the moderation times are, typically. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this grou