[Rails] A model's validators as json

2014-07-27 Thread Kurt Mueller
Hey guys, I've been working with Rails and a number of frontend js frameworks and libs, including Ember, Angular, and React. While all three libraries are powerful in their own regard, one pain point (for me at least) has always been form validation. I've always hated having to keep my model va

[Rails] Ruby On Rails Install on Win 7 32 bit error

2014-07-27 Thread rubynewbie
I am a newbie on Ruby on Rails. When trying to install on Win 7 32 bit PC, after executing gem install rails, got the following errors: 9 gems installed error: while generating documentation for actionpack-4.1.4 ... MESSAGE: Invalid argument - ./ActionDispatch/Routing/Mapper/Scoping/: ... RDOC

Re: [Rails] Ruby On Rails Install on Win 7 32 bit error

2014-07-27 Thread Colin Law
On 27 July 2014 04:01, rubynewbie wrote: > I am a newbie on Ruby on Rails. When trying to install on Win 7 32 bit PC, > after executing gem install rails, got the following errors: I strongly recommend *not* using Windows for rails development, use a linux distribution (eg Ubuntu) or Mac. If, ho

Re: [Rails] Ruby On Rails Install on Win 7 32 bit error

2014-07-27 Thread tamouse pontiki
On Sat, Jul 26, 2014 at 10:01 PM, rubynewbie wrote: > I am a newbie on Ruby on Rails. When trying to install on Win 7 32 bit PC, > after executing gem install rails, got the following errors: > > 9 gems installed > error: while generating documentation for actionpack-4.1.4 > ... MESSAGE: Invali

[Rails] (Occasionally) display DateTime as local time

2014-07-27 Thread Ronald Fischer
I store my dates in the database as 'datetime', and I use i.e. DateTime.now for getting the current date and time and doing time arithmetic. I have set neither config.time_zone nor a default locale in config/application.rb When outputting such a time value, I just convert it to string, i.e. "#{my_

Re: [Rails] (Occasionally) display DateTime as local time

2014-07-27 Thread Colin Law
On 27 July 2014 13:13, Ronald Fischer wrote: > I store my dates in the database as 'datetime', and I use i.e. > DateTime.now for getting the current date and time and doing time > arithmetic. I have set neither config.time_zone nor a default locale in > config/application.rb > > When outputting su

[Rails] object.errors not work in Bootstrap Form Helper

2014-07-27 Thread Nikolay Lipovtsev
I made helper ​​for Bootstrap Form. In it I made ​​a separate method has_error?, who must determine whether the error messages, but this is not happening. How can I fix it? If there are still errors, omissions, and not the optimal code will once remarks and comments as to optimize (because I

Re: [Rails] (Occasionally) display DateTime as local time

2014-07-27 Thread Scott Ribe
On Jul 27, 2014, at 7:49 AM, Colin Law wrote: > Not addressing the 'local time' issue, but if you know what time zone > you want it in then you can use, for example > my_timestamp.in_time_zone("London") And if you don't want to change the RoR default, you can think up your own name and add your

[Rails] Dropdown menu does not work

2014-07-27 Thread Jaimin Pandya
I am using Ruby 1.9.3 and Rails 3.2.16. My bootstrape dropdown menu not working. I have no idea why? >> Gemfile contain: ruby "1.9.3" gem 'rails', '3.2.16' gem 'bootstrap-sass', '2.1' gem "watu_table_builder", :require => "table_builder", :git => "git://github.com/watu/table_builder.git" gem 'bc

[Rails] rake test:prepare fails in Rails 4.0.8

2014-07-27 Thread Special Agent Dale Cooper
I was testing my app (with rspec) when I noticed that *rake test:prepare* throws an odd *FATAL: database "postgres" does not exist *error. Stranger still, my tests run just fine regardless. However, whenever I use rake *test:prepare --trace *(after using *rake db:migrate*) I get this error an

Re: [Rails] Dropdown menu does not work

2014-07-27 Thread Sampath Weerasinghe
Does the javascript console ( F12 ) show any errors ? On Sunday, July 27, 2014, Jaimin Pandya wrote: > I am using Ruby 1.9.3 and Rails 3.2.16. > > My bootstrape dropdown menu not working. I have no idea why? > > >> Gemfile contain: > > ruby "1.9.3" > gem 'rails', '3.2.16' > gem 'bootstrap-sass',

Re: [Rails] CKEditor on Heroku

2014-07-27 Thread Duong vong veasna
yes, it work properly in localhost. On Saturday, July 26, 2014 11:26:04 PM UTC+7, Hassan Schroeder wrote: > > On Sat, Jul 26, 2014 at 2:44 AM, Duong vong veasna > > wrote: > > > i have used ckeditor in my rails app, > > on local machine it work good, but on heroku server it not good, > > when

[Rails] Re: Dropdown menu does not work

2014-07-27 Thread Jaimin Pandya
Sampath Weerasinghe wrote in post #1153678: > Does the javascript console ( F12 ) show any errors ? When I used code in application.js as per javascript load order like as follow: //= require jquery //= require jquery_ujs //= require jquery-ui //= require bootstrap //= require_tree . I got erro