[Rails] Re: Where to set utf-8 encoding

2011-02-04 Thread Paul Bergstrom
I added this to the top of environment.rb Encoding.default_external = 'UTF-8' Seems to have done the trick. At least I think so. -- 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

[Rails] Re: Ignore attr_accessible in seed file

2011-02-04 Thread Markus Proske
On Thursday, February 3, 2011 11:58:23 PM UTC+1, Ruby-Forum.com User wrote: Here's one way I found a quick Google search: http://stackoverflow.com/questions/4838716/how-to-avoid-the-validation-callbacks-and-attr-accessible-effects-during-the-s Thank you. I've already been there and this

[Rails] Problem with test-unit 2.1.2 and self.startup method

2011-02-04 Thread Szymon Nowak
Hey, I've got strange problem with self.startup method - it's supposed to be executed only once, but it seems like it's not the case. This log is from running a single test file: Running AS::TestCase.startup Running AS::TestCase.startup Running AS::TestCase.startup Running AS::TestCase.startup

[Rails] Re: Testing and application

2011-02-04 Thread Hans
thanks for all good advices I will follow them and start by getting the Rspec book and will then use cucumber and finally rspec for any new or refactored code On 3 Feb, 16:15, yurokle yuro...@gmail.com wrote: I totally agree with Peter, you should implement cucumber tests at first, and then if

[Rails] Re: How to transfer a javascript value into a symbol used in Ruby on Rails

2011-02-04 Thread Mohnish G j
Frederick Cheung wrote in post #979561: On Feb 4, 1:36am, Mohnish G j li...@ruby-forum.com wrote: need to though. When the form containing the calendar gets submitted, create button. It's taking a NULL value currently and not the value selected via the plugin date interface. According to

[Rails] Re: Where to set utf-8 encoding

2011-02-04 Thread Phillip
http://blog.grayproductions.net/articles/ruby_19s_three_default_encodings On Feb 4, 3:09 am, Paul Bergstrom li...@ruby-forum.com wrote: I added this to the top of environment.rb Encoding.default_external = 'UTF-8' Seems to have done the trick. At least I think so. -- Posted

[Rails] How to work with Database in routes? Rails 3

2011-02-04 Thread redhotberry
Hello. How to check presence of object in DB in routes? If object exists in DB - rais app shows its page, if not - it redirects to 404. I know that it's possible to do all this logic in controller but i would to know how to do it in routes. -- You received this message because you are subscribed

[Rails] bundle show

2011-02-04 Thread hari
$ bundle show mysql /home/bhas/.rvm/gems/ruby-1.9.2-p136/gems/mysql-2.8.1 but when I run $ rake db:migrate (in /home/bhas/projects/schapp) rake aborted! no such file to load -- mysql-2.8.1 /home/bhas/projects/schapp/Rakefile:4:in `top (required)' (See full trace by running task with --trace)

[Rails] Re: How to transfer a javascript value into a symbol used in Ruby on Rails

2011-02-04 Thread Frederick Cheung
On Feb 4, 10:05 am, Mohnish G j li...@ruby-forum.com wrote: Fred Hi Fred, it doesn't work. I have tried it out earlier also. What happens? What do the parameters look like in the log file? Fred -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are

[Rails] Re: how to set default_scope for the whole application?

2011-02-04 Thread pepe
I want is to set default_scope :order = 'created_at ASC' for all models on default. How is that done? If you want to do this no matter what I think there should be a way to do it at initialization. If you are using Rails 2.3.x you might be able to do it in 'new_rails_defaults.rb' in folder

[Rails] Re: Ignore attr_accessible in seed file

2011-02-04 Thread Frederick Cheung
On Feb 4, 8:51 am, Markus Proske markus.pro...@gmail.com wrote: On Thursday, February 3, 2011 11:58:23 PM UTC+1, Ruby-Forum.com User wrote: Here's one way I found a quick Google search: http://stackoverflow.com/questions/4838716/how-to-avoid-the-validatio... Thank you. I've already been

[Rails] Re: how to get rid of nil values in session?

2011-02-04 Thread Frederick Cheung
On Feb 4, 7:46 am, arunmehta arun.me...@gmail.com wrote: When I inspect the session hash, it shows me lots of entries that I have assigned a nil value to at some point. Is that taking up a lot of space? What is a good way to get rid of these useless entries? You should probably track down

[Rails] Re: Where to set utf-8 encoding

2011-02-04 Thread Paul Bergstrom
Phillip wrote in post #979611: http://blog.grayproductions.net/articles/ruby_19s_three_default_encodings Great article. Informative and educational. Thank you. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: TinyMCE editor

2011-02-04 Thread frankblizzard
might be a stupid question but did you include jquery explicitly in your application.html.erb file or whatever layout you are using? or just the :defaults? because jquery doesn't get included by default On 4 Feb., 07:59, kirti parihar pariharkirt...@gmail.com wrote: hi... I m newbie in RoR and  

Re: [Rails] Required Ruby on Rails Developer ( Front End/ Back End ) / Boston, MA ( Immediate Interview )

2011-02-04 Thread jay gallivan
Greetings: Thanks for contacting me. What is the rate on the project? What is the business domain? Regards, Jay. On Wed, Feb 2, 2011 at 11:06 AM, Chandan Kumar recruit...@quantronix.comwrote: Dear Partner, Please find our Urgent Direct Client Requirement and send me some matching

Re: [Rails] Re: Re: Configure logger, reopen class

2011-02-04 Thread Curtis
On Feb 3, 2011, at 2:16 PM, Albert Català li...@ruby-forum.com wrote: Curtis wrote in post #979429: On Feb 3, 2011, at 2:57 AM, Albert Catal li...@ruby-forum.com wrote: super(ERROR+msg) end end this is in a file.rb in config/initializers/ and raises the error I said

Re: [Rails] one form for one model with nested resources.

2011-02-04 Thread Bente Pieck
http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html Haven't tested it, but perhaps you try something like this: class Customer has_many :deliveries has_one :document accepts_nested_attributes_for :deliveries, :reject_if = lamda { |attributes|

Re: [Rails] one form for one model with nested resources.

2011-02-04 Thread Mauro
On 4 February 2011 16:07, Bente Pieck bente.pi...@tu-dortmund.de wrote: http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html Haven't tested it, but perhaps you try something like this: class Customer has_many :deliveries has_one :document

Re: [Rails] Re: TinyMCE editor

2011-02-04 Thread kirti parihar
Thanks dear for reply actually i knew this jquery doesnot included bydefault. There was jQuery conflict...so to reslove i run jQuery in no-conflict modenow its working fine... On Fri, Feb 4, 2011 at 8:25 PM, frankblizzard tmaxim...@googlemail.comwrote: might be a stupid question but did you

[Rails] [JOBS] Hiring Rails Developers - Social Networking Startup in New Hope, Pennsylvania

2011-02-04 Thread OurKudos
Dynamic Social Networking Startup Seeks Developers Join us in building a Social Networking revolution! We are seeking several talented, motivated, hard working web application developers to augment our growing team. Main consideration will be given to applicants with prior Ruby-on-Rails

Re: [Rails] Re: Where to set utf-8 encoding

2011-02-04 Thread David Kahn
On Fri, Feb 4, 2011 at 8:39 AM, Paul Bergstrom li...@ruby-forum.com wrote: Phillip wrote in post #979611: http://blog.grayproductions.net/articles/ruby_19s_three_default_encodings Yeah, I saw that too, unusually clear on a subject that generally makes my eyes glaze over Great article.

[Rails] Date parse - month and day reversed

2011-02-04 Thread David Kahn
I am getting the month and day reversed in parsing a date. I am wondering if there is some intelligence in Ruby that knows that at the moment I am in Mexico, as the parsing is working as if I was 6/15/2008.to_date = ArgumentError: invalid date 15/6/2008.to_date = Sun, 15 Jun 2008 What I really

[Rails] Re: Date parse - month and day reversed

2011-02-04 Thread David Kahn
Ok, feel a little stupid, if I put the date in the form -mm-dd and then parse it I get the right result. Anyhow, this works as a resolution for me but is still I think an important question if in the case I was receiving dates in something like 'mm/dd/' how I can get it to parse right.

Re: [Rails] Re: Date parse - month and day reversed

2011-02-04 Thread Frederick Cheung
On 4 Feb 2011, at 17:36, David Kahn d...@structuralartistry.com wrote: Ok, feel a little stupid, if I put the date in the form -mm-dd and then parse it I get the right result. Anyhow, this works as a resolution for me but is still I think an important question if in the case I was

Re: [Rails] bundle show

2011-02-04 Thread Frederick Cheung
On 4 Feb 2011, at 07:54, hari harihara.bhas...@gmail.com wrote: $ bundle show mysql /home/bhas/.rvm/gems/ruby-1.9.2-p136/gems/mysql-2.8.1 but when I run $ rake db:migrate (in /home/bhas/projects/schapp) rake aborted! no such file to load -- mysql-2.8.1

[Rails] Re: Problem with reset session cookies causing session sharing in an unstable network.

2011-02-04 Thread Matt Jones
On Feb 3, 10:01 am, Jemmaniam j.mark.bro...@gmail.com wrote: I was wondering if anyone might help me with a peculiar problem.  We are having a problem with our network that is resulting in, say, UserA getting UserB's response, resulting in his session cookie being reset and two users sharing

[Rails] Re: Date parse - month and day reversed

2011-02-04 Thread Robert Pankowecki (rupert)
Might wanna look at : https://github.com/adzap/timeliness https://github.com/adzap/validates_timeliness Robert Pankowecki http://robert.pankowecki.pl -- 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

[Rails] Re: how to get rid of nil values in session?

2011-02-04 Thread Robert Pankowecki (rupert)
How about deleting them in some after filter ? session.keys.each do |k| session.delete(k) if session[k].nil? end However you must be aware that sometimes in you application there might be a difference between nil value and unset key (usually it is a very rare case). Robert Pankowecki

[Rails] rails hoster recommendation

2011-02-04 Thread frankblizzard
hi, i work in a small web development company and we just finished some first applications using rails, before it was php all the way. now our actual hoster doesnt offer rails so we need another one only for the rails projects. i wonder if anyone can recommend a good rails hoster? its mostly

[Rails] Re: Install Issue with sqlite3.dll

2011-02-04 Thread Parth B
Thank you greatly for your help Bosko. After another try and some help from a friend of mine your suggestions seem to have fixed the issue. Much appreciated! -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

Re: [Rails] rails hoster recommendation

2011-02-04 Thread Bill Walton
You might want to take a look at using Amazon Web Services' EC2 and/or S3. Best regards, Bill On Fri, Feb 4, 2011 at 3:10 PM, frankblizzard tmaxim...@googlemail.com wrote: hi, i work in a small web development company and we just finished some first applications using rails, before it was

Re: [Rails] rails hoster recommendation

2011-02-04 Thread Frederick Cheung
On 4 Feb 2011, at 21:10, frankblizzard tmaxim...@googlemail.com wrote: now our actual hoster doesnt offer rails so we need another one only for the rails projects. i wonder if anyone can recommend a good rails hoster? its mostly smaller apps but with a lot of images / videos so a lot of

Re: [Rails] rails hoster recommendation

2011-02-04 Thread JGW Maxwell
Very very hard to look past Heroku in my opinion. -- 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 this group, send email to

[Rails] Re: How to work with Database in routes? Rails 3

2011-02-04 Thread Frederick Cheung
On Feb 4, 9:23 am, redhotberry redhotbe...@gmail.com wrote: Hello. How to check presence of object in DB in routes? If object exists in DB - rais app shows its page, if not - it redirects to 404. I know that it's possible to do all this logic in controller but i would to know how to do it in

Re: [Rails] Re: How to work with Database in routes? Rails 3

2011-02-04 Thread David Kahn
On Fri, Feb 4, 2011 at 6:25 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 4, 9:23 am, redhotberry redhotbe...@gmail.com wrote: Hello. How to check presence of object in DB in routes? If object exists in DB - rais app shows its page, if not - it redirects to 404. I know

Re: [Rails] bundle show

2011-02-04 Thread Bhasker Harihara
Thanks Fred, I had created the project using rails new app -d mysql which bydefault added mysql2. I had changed the Gemfile to use mysql instead of mysql2 but did not change the database.yml file in the config directory. On Fri, Feb 4, 2011 at 1:24 PM, hari harihara.bhas...@gmail.com wrote:

[Rails] ActionMailer

2011-02-04 Thread Bhasker Harihara
Hi, I am planning to write an internal messaging system for my users. Should I be using Actionmailer ? I am not interested in using any plugin or 3rd party sw as I want to learn some ror. Is actionmailer used mainly for feedback and sending general emails. I am a new to rails so any

[Rails] How to give link to image in .erb file

2011-02-04 Thread amritpal pathak
i am new to ruby.I want to add one image to my webpage.Please tell me how to give a link to image from .erb file?? Thanks -- 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

[Rails] Re: how to get rid of nil values in session?

2011-02-04 Thread arunmehta
On Feb 5, 1:09 am, Robert Pankowecki (rupert) robert.pankowe...@gmail.com wrote: How about deleting them in some after filter ? session.keys.each do |k|   session.delete(k) if session[k].nil? end Thanks, Robert, but... session is not a regular hash, and does not seem to have the delete