tagged [ruby-on-rails]

Undo scaffolding in Rails

Undo scaffolding in Rails Is there any way to 'undo' the effects of a scaffold command in Rails?

5 Apr at 21:10

No route matches "/users/sign_out" devise rails 3

No route matches "/users/sign_out" devise rails 3 I've installed devise on my app and applied the following in my `application.html.erb` file: ``` Signed in as . This cannot be cheese?

How to run a single RSpec test?

How to run a single RSpec test? I have the following file: What command in terminal do I use to run just that spec and in what directory do I run the command? My gem file: ``` # Test ENVIRONMENT GEMS ...

Is there a easy-used two-way encryption method for string in ruby?

Is there a easy-used two-way encryption method for string in ruby? Is there a easy-used two-way encryption method for string in ruby?

9 Nov at 06:25

Rails get index of "each" loop

Rails get index of "each" loop So I have this loop: How would I get the index of "page" inside of the loop?

27 Jan at 00:11

How can I uninstall Ruby on ubuntu?

How can I uninstall Ruby on ubuntu? How can I uninstall Ruby 1.9.2dev (2010-07-02) [i486-linux] on ubuntu? Need to reinstall - please help

Difference between string and text in rails?

Difference between string and text in rails? I'm making a new web app using Rails, and was wondering, what's the difference between `string` and `text`? And when should each be used?

13 Jan at 23:6

Change a Rails application to production

Change a Rails application to production How can I change my Rails application to run in production mode? Is there a config file, environment.rb for example, to do that?

How to start facebook app?

How to start facebook app? Just want to know what is better way to get start developing faccebook app?Any tutorial recommnedation?And which is better to start up -php or rails?

24 Sep at 19:9

Run a single migration file

Run a single migration file Is there an easy way to run a single migration? I don't want to migrate to a certain version I just want to run a specific one.

15 Apr at 22:3

How do I get the current absolute URL in Ruby on Rails?

How do I get the current absolute URL in Ruby on Rails? How can I get the current URL in my Ruby on Rails view? The `request.request_uri` only returns the URL.

29 Mar at 19:33

Replace words in a string - Ruby

Replace words in a string - Ruby I have a string in Ruby: How can I replace any one word in this sentence easily without using complex code or a loop?

7 Jul at 11:31

Translating Rails Timezones

Translating Rails Timezones We internationalized our site months ago, but forgot one part: The drop down where a user picks their timezone. How do you translate the following line:

8 Sep at 22:14

@ variables in Ruby on Rails

@ variables in Ruby on Rails What's the difference between `@title` and `title`? Since both of them can be variable names. Also, how do I decide which kind of variable I should use? With `@` or not?

19 Feb at 02:33

How do I create an average from a Ruby array?

How do I create an average from a Ruby array? How would get find an average from an array? If I have the array: Averaging would give me 3.375.

5 Nov at 17:2

What is the purpose of RakeFile in the application root directory

What is the purpose of RakeFile in the application root directory I am using Ruby on Rails and I see a 'Rakefile' in my application's root directory. What is its purpose and when will it get executed?

29 Jul at 20:33

How can I rollback a specific migration?

How can I rollback a specific migration? I have the [migration file](https://guides.rubyonrails.org/active_record_migrations.html) `db\migrate\20100905201547_create_blocks.rb`. How can I specifically ...

Rails check if yield :area is defined in content_for

Rails check if yield :area is defined in content_for I want to do a conditional rendering at the layout level based on the actual template has defined `content_for(:an__area)`, any idea how to get thi...

10 Mar at 15:14

Rails select helper - Default selected value, how?

Rails select helper - Default selected value, how? Here is a piece of code I'm using now: How to modify it to make its default value equal to to `params[:pid]` when page is loaded?

27 Oct at 11:48

Checking if a variable is an integer

Checking if a variable is an integer Does Rails 3 or Ruby have a built-in way to check if a variable is an integer? For example,

28 Apr at 04:25

Why should I use Ruby on Rails?

Why should I use Ruby on Rails? A friend of mine asked me if I was aware of Ruby on Rails ... and frankly I have heard a lot about it but know practically nothing about it. Any help will be much appre...

3 Jun at 01:2

How Efficient is ActionMailer?

How Efficient is ActionMailer? I am building a tool for users to send invites for a site. Is ActionMailer the best way to send the mail? It seems to be very very slow. Anyone have other recommendatio...

19 Sep at 05:14

How to implement Active Record inheritance in Ruby on Rails?

How to implement Active Record inheritance in Ruby on Rails? How to implement inheritance with active records? For example, I want a class Animal, class Dog, and class Cat. How would the model and the...

Rails: call another controller action from a controller

Rails: call another controller action from a controller I need to call the create action in controller A, from controller B. The reason is that I need to redirect differently when I'm calling from con...

11 Oct at 09:0

How to log something in Rails in an independent log file?

How to log something in Rails in an independent log file? In rails I want to log some information in a different log file and not the standard development.log or production.log. I want to do this logg...

3 Dec at 16:24