Re: [Rails] rvm installation script

2013-05-05 Thread Colin Law
On 5 May 2013 00:30, John Merlino stoici...@aol.com wrote: Which of these scripts is preferred to install rvm on ubuntu server: curl -#L https://get.rvm.io | bash -s stable --autolibs=4 --ruby I don't think-#L is a good idea, but I assume that is a typo curl -L get.rvm.io | bash -s stable

Re: [Rails] rvm installation script

2013-05-05 Thread John Merlino
https://rvm.io/rvm/install Look at the first line: Install RVM with ruby (# for pretty output): $ \curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby But later on on that page it sasy: 1. Download and run the RVM installation script Installing the stable release version:

Re: [Rails] rvm installation script

2013-05-05 Thread Colin Law
On 5 May 2013 15:51, John Merlino stoici...@aol.com wrote: Please don't top post, thanks. https://rvm.io/rvm/install Look at the first line: Install RVM with ruby (# for pretty output): $ \curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby But later on on that page it

[Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread rihad
On May 4, 11:53 pm, Scott Eisenberg sco...@btrtrucks.com wrote: This one is Rails 4 specific http://edgeguides.rubyonrails.org/getting_started.html Alas, in 5.2 The first form the empty form isn't shown in new.html.erb. This is all I get after clicking view source in Firefox: !DOCTYPE html

Re: [Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread Colin Law
On 5 May 2013 16:09, rihad ri...@mail.ru wrote: On May 4, 11:53 pm, Scott Eisenberg sco...@btrtrucks.com wrote: This one is Rails 4 specific http://edgeguides.rubyonrails.org/getting_started.html Alas, in 5.2 The first form the empty form isn't shown in new.html.erb. Are there any error

Re: [Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread Colin Law
On 5 May 2013 16:17, Colin Law clan...@googlemail.com wrote: On 5 May 2013 16:09, rihad ri...@mail.ru wrote: On May 4, 11:53 pm, Scott Eisenberg sco...@btrtrucks.com wrote: This one is Rails 4 specific http://edgeguides.rubyonrails.org/getting_started.html Alas, in 5.2 The first form the

[Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread rihad
Hi, Colin, no errors in the rails server window: Started GET /posts/new for 192.168.0.1 at 2013-05-05 20:23:21 +0500 Processing by PostsController#new as HTML Rendered posts/new.html.erb within layouts/application (11.6ms) Completed 200 OK in 34ms (Views: 31.2ms | ActiveRecord: 0.0ms) (and a

[Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread rihad
new.html.erb copied from the tutorial as is: % form_for :post, url: posts_path do |f| % p %= f.label :title %br %= f.text_field :title % /p p %= f.label :text %br %= f.text_area :text % /p p %= f.submit % /p % end % I can put %= hi % before or after form_for, and

Re: [Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread Colin Law
On 5 May 2013 16:28, rihad ri...@mail.ru wrote: new.html.erb copied from the tutorial as is: % form_for :post, url: posts_path do |f| % p %= f.label :title %br %= f.text_field :title % /p p %= f.label :text %br %= f.text_area :text % /p p %= f.submit %

[Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread rihad
Thanks, will do that for now. I just thought the guides hosted on rubyonrails.org were more official and up-to-date. Well, they weren't. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving

Re: [Rails] Getting started w/ Rails 4

2013-05-05 Thread Walter Lee Davis
On May 5, 2013, at 12:15 PM, rihad wrote: Thanks, will do that for now. I just thought the guides hosted on rubyonrails.org were more official and up-to-date. Well, they weren't. They are official for 3.2, which is stable until 4.0 clears release candidate stage. I am glad to see you are

Re: [Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread Hassan Schroeder
On Sun, May 5, 2013 at 8:28 AM, rihad ri...@mail.ru wrote: new.html.erb copied from the tutorial as is: % form_for :post, url: posts_path do |f| % Then the tutorial is in error: you need %= form_for ... -- Hassan Schroeder hassan.schroe...@gmail.com

Re: [Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread Colin Law
On 5 May 2013 17:33, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sun, May 5, 2013 at 8:28 AM, rihad ri...@mail.ru wrote: new.html.erb copied from the tutorial as is: % form_for :post, url: posts_path do |f| % Then the tutorial is in error: you need %= form_for ... Well spotted, I

[Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread rihad
On May 5, 9:33 pm, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sun, May 5, 2013 at 8:28 AM, rihad ri...@mail.ru wrote: new.html.erb copied from the tutorial as is: % form_for :post, url: posts_path do |f| % Then the tutorial is in error: you need  %= form_for ... Woops, sorry,

[Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread rihad
This time there does seem to be an obsoleted part not in sync with latest code on http://edgeguides.rubyonrails.org/getting_started.html 5.6 Saving data in the controller @post = Post.new(params[:post]) triggers the exception ActiveModel::ForbiddenAttributesError in PostsController#create the

[Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread rihad
p.s. I wonder if this repetitiveness is needed here. For the simple case such as Post.new(params[:post]), I guess Rails should just know what fields comprise a model and permit relevant safe fields coming from POSTed data. Of course one can always override that with the second permit variant, but

Re: [Rails] rvm installation script

2013-05-05 Thread Jordon Bedwell
On Sun, May 5, 2013 at 9:51 AM, John Merlino stoici...@aol.com wrote: https://rvm.io/rvm/install Look at the first line: Install RVM with ruby (# for pretty output): $ \curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby But later on on that page it sasy: The line above is

Re: [Rails] rvm installation script

2013-05-05 Thread Michał Papis
extra note for the -#L it means: show progress bar + follow links On Sunday, May 5, 2013 10:06:56 PM UTC+2, Jordon Bedwell wrote: On Sun, May 5, 2013 at 9:51 AM, John Merlino stoi...@aol.comjavascript: wrote: https://rvm.io/rvm/install Look at the first line: Install RVM with ruby (#

Re: [Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread Colin Law
On 5 May 2013 19:33, rihad ri...@mail.ru wrote: p.s. I wonder if this repetitiveness is needed here. For the simple case such as Post.new(params[:post]), I guess Rails should just know what fields comprise a model and permit relevant safe fields coming from POSTed data. Of course one can

[Rails] How to create dynamic edit option for static content in full static ruby on rails app

2013-05-05 Thread pradeepguptab2b
I just created a question in stackoverflow, Link is here, Please see this and answer my question. http://stackoverflow.com/questions/16385311/how-to-create-dynamic-edit-option-for-static-content-in-full-static-ruby-on-rail Thanks Pradeep Gupta Ruby On Rails Developer -- You received this

[Rails] Re: Getting started w/ Rails 4

2013-05-05 Thread rihad
Hi, Colin, you see, I think that listing permitted fields all over again in the controller can be viewed as repetitiveness. Ideally, model would just accept the bulk of fields coming from the outside, validate their presence + conformance, and yell if it isn't the case. How it is being done now