RailsCasts Pro episodes are now free!

Learn more or hide this

Recent Comments

Avatar

I usually write a puppet file, then I can use capistrano to pull in the puppet file, install RVM, then ruby, then the puppet gem, then run the puppet config, then I run another cap command to actually deploy the app.

Puppet is nice because it's system agnostic in case you decide to change the distribution of linux.

Avatar

I am working on a maintenance project which is in Rails 3.2.3. Here for payments they are using Active Merchant gem for Paypal integration. As per the code review I did, mostly the code is written based on this railscast.

When I enter a credit card number, it is saved as a "xxxx-xxx-xxx-1234. It is fine in local but in production, it is storing in plain text sometimes. Does Active Merchant have any mechanism to encrypt this card number? or Is there any way to store this card number as "xxxx-xxx-xxx-1234"?

Avatar

This episode is updated for Rails 5 as a blog post Model Name in URL

Avatar

hello thanks for the gem Ryan.

you asked for comments & feedbacks here it is: i found it (the video) a little confusing some parts where rushed in explanation, but in any case, i will try the documentation and then ask questions if need be.

Avatar

Hi, I believe the form tag is missing the '=', otherwise the form does not show in html

Avatar

Excelx.new(file.path, nil, :ignore) - has error!
Required <= 2: filename_or_stream, options ...i can't find a options names...

Avatar

Ai perfecta dreptate in ce priveste http://calculatoaresecondhand.xyz/ pentru aplicabilitatea pe sistemele refurbished

Avatar

I want to save the filters params , that applied on a model. How can i get these params. Do anyone have any idea about this.

Avatar

To learn how to implement autocomplete using Twitter typeahead javascript, elasticsearch with searchkick in Rails 5, check out Autocomplete using Typeahead and Searchkick in Rails 5

Avatar

Using virtual attributes like this means the crop location information is lost after the initial crop. This means that a call to 'recreate versions' later will lose all the crop information.

If this is important to you, use database fields for the crop information instead.

Avatar

Hi there! You probably have a typo in a date part of a migration name.
Maybe there should be "201204100000", not "291204100000"?

Avatar

the video doesn't work anymore as of 2016/05. Please fix this

Avatar

Caching the whole of is has always proven to be the best option that can be https://flix-account.com

Avatar

hey friends i got the solution on multi-step form edit and update methods something like this bellow->

after watching this video I created two step form and it was working greatly thanks to Sir Ryan, but after while when i was went for editing and update the form it doesn't working.
It renders on the first step successfully but when i click on the continue button the form goes to update and skips the next step. That was really big issue with my app.

So after very long efforts I found solution may be it is wrong way but for me its working smoothly lets see how it works->

First of all gave the "name: some name" to all buttons n that form's each button.
then make extra view file (not partial) for last step (i had only 2 steps) so for second step as same as your partial for second step.
now then come back to your controller's update method and write code

if params[:continue_button]
   render :template => '/your_controller/second_step_view'
elsif params[:save_button]
  @user.update(user_params)
  respond_with(@user)
else
  render new_user_path  #it will render u on firststep again
end

that's it.

lets

Avatar

yes i found one solution after very long battle to this type of form you can see my comment bellow how i did it.

Avatar

This episode has been updated to Rails 5 as a blog post Fragment Caching in Rails 5

Avatar

I am here to search for the best processor that can make it easy to get paypal money adder now.The website that can give you money is here and you can get online tool for the cash.

Avatar

I came back to this solution while I was trying to teach myself code optimization and refactoring.

I tried as an exercise refactoring class MemberPermission < BasePermission to class MemberPermission < GuestPermission, seeing as how much of the static pages logic, etc. is being duplicated. I thought that is Members could inherit all the permissions of a guest, then it would be better.

However, the filter chain halts as :authorize redirects in an infinite loop. Generally, this means that a permission hasn't been defined for that user and it's trying to redirect to static#home.

I was wondering if anyone has any insight on this? I'll post to Stack as well..

Avatar

One of the best strategic game that i have ever played is clash of clans which is full of enjoyment where the players use create their own army and manage to win all the battles by training their troops and grooming their skills in such a way that they defeat them with much ease.Apart from it there one exciting news for you as there is the place http://cocelixirsbox.com/ where you can generate the unlimited gems,gold,elixirs and many more through which you wil be able to acquire the whole world in it and enjoy the fantasy of this game very much.Thank you very much.

Avatar

The code for this episode has been updated to Rails 5, you can download it from virta

Avatar

The code for this episode has been updated to Rails 5, download the code form emu

Avatar

This episode code is upgraded to Rails 5, check out the source code fb5

Avatar

The source code for this episode has been updated to Rails 4.2.6. You can download it from cms4

Avatar

This episode has been updated to Rails 5 as a blog post Factories in Rails 5

Avatar

This episode has been updated to Rails 5 as a blog post PDFs with Prawn in Rails 5

Avatar

This episode has been updated to Rails 5 as a blog post Rails 5 ActiveRecord and Partials

Avatar

To get this working in Rails 5, I had to turn off Turbolinks. Checkout the source code on how to get this working in Rails 5.

Avatar

Just stumbled upon this - well done. Very helpful - thank you!

Avatar

are you able to do edit and update using your code? if yes then please help me to do same. I am stuck at edit and update . whenever I'm trying to edit it showing first step that is okay but after pressing the continue button form saves and not going to next step. what should i do?

Avatar

You were very close to get it working. The cause of this failure is strong parameters. You have to do:

ruby
params.require(:your_model).permit!

You can also specify which fields you want to allow by doing:

ruby
permit(:field1, :field2)
Avatar

This episode has been updated to Rails 5 as a blog post Rails 5 Extras

Avatar

This episode code is upgraded to work with Rails 5. Checkout the code with hash 3621d71c558ac16aa0b8e56abcdba1b88ffcb562

Avatar

This episode has been updated to work with Rails 5 Paypal Basics

Avatar

Running rake tasks:
bin/rake test:models

Running a Rails command:
bin/rails console