ruby-on-rails-3.2 Questions

6

Solved

I have users entering in dates in a Ruby on Rails website. I parse the dates into a DateTime object with something like: date = DateTime.new(params[:year].to_i, params[:month].to_i, params[:day].t...

7

Solved

I have the following code in a Rails controller: flash.now[:notice] = 'Successfully checked in' redirect_to check_in_path Then in the /check_in view: <p id="notice"><%= notice %>&lt...

2

Solved

I tried to add a column to a table after a specific column in the table. Here is what I did: rails generate migration add_reaction_id_to_patient_allergies reaction_id: integer :after => 'patien...

14

Solved

I am using tinyMCE4 editor inside a Boostrap modal dialog. when I clicked on link icon it opens a new modal dialog box, It displayed fine but the input areas are not editable. <div id="editing"...

6

Solved

we've just upgraded to Rails 3.2.5 from Rails 3.0.7 and using the assets-pipeline compilation on the fly for the staging server, but some times we face this exception ! Showing /var/rails/appname/...

7

Solved

I'm working on an application that needs to use session id information. My session is stored in cookies. The problem I have is that my session is not immediately available to the controller when a ...

15

Solved

In my development and test environments, I want to seed the database with a bunch of users. I'm using Ruby on Rails v3.2.8 and the latest Devise. So I added this line in my db/seeds.rb file: User....

3

Solved

I'm just starting with Devise and Rails3. I have the Authenetication down and working and understand the basics. As of now in my Home Controller that represents my Home/Front Page i have two links...

6

Solved

I've been developing a site in rails, everything going relatively smooth. Suddenly my changes to the views and assets no longer show up. I change a stylesheet or some html and reload my browser at ...

13

Solved

I wanted to add confirmation message on link_to function with Ruby. = link_to 'Reset message', :action=>'reset' ,:confirm=>'Are you sure?' Any ideas why it's not working?

3

Solved

My rails logger configuration currently logs the current time and UUID, like this: config.logger = ActiveSupport::TaggedLogging.new(Logger.new("#{Rails.root}/log/#{ENV['RAILS_ENV']}.log", 'daily')...
Masterful asked 17/5, 2012 at 1:46

3

Solved

In rails 3.2.0,is it possible to turn off rails logging for rendering of views in ActionView:: LogSubscriber in production environment. Currently only way i found to supress is to monkey patch it ...
Complicacy asked 20/10, 2012 at 3:28

21

Solved

When I am starting rails server using rails s command it is showing A server is already running. Check C:/Sites/folder/Pids/Server.pids When I open the file it is outputting a 4 digit number only ...

3

Solved

We have a rails 3.2(.11) app with many dynos running on the heroku bamboo stack, connecting to a MySQL RDS server. There seem to be some issues with our current database connections, so we are tryi...
Geraldgeralda asked 25/1, 2013 at 18:45

7

Solved

Just wondering whether there's a way to use turbolinks directly in a rails link_to helper, a quick bit of googling didn't uncover anything of note, here's the type of thing I've tried to no avail. ...
Valetudinarian asked 9/1, 2013 at 2:23

5

Solved

In my InvoicesController I have this: def index @invoices = current_user.invoices respond_to do |format| format.html format.xls format.csv # not working! end end In my index.html.erb view ...
Bueschel asked 9/6, 2013 at 22:45

3

Solved

Without using any gems how do I do this in rails? Main Category  Sub Category  Sub Category  Sub Category Main Category  Sub Category  Sub Category  Sub Category Main Category  Sub Category  S...
Commonplace asked 7/1, 2013 at 14:27

3

Solved

I'm having trouble displaying a list of days in a week in a form. <%= form_for [@hourable, @hour] do |f| %> <% days = [] Date::DAYNAMES.each_with_index { |x, i| days << [x, i] } ...
Exaggeration asked 26/6, 2013 at 3:21

4

Solved

I'm using Devise and Rails 3.2.16. I want to automatically insert who created a record and who updated a record. So I have something like this in models: before_create :insert_created_by before_up...

28

Description of problem: - I've setup factory_girl_rails however whenever I try and load a factory it's trying to load it multiple times. Environment: - rails (3.2.1) - factory_girl (2.5.2) - facto...
Ineffective asked 15/2, 2012 at 19:47

10

Here is my rails link_to <%= link_to 'Delete',url_for(action: :delete,id: @user.id),data: {confirm: "Are you sure?"} %> I tried the above method but it is directly deleting without any al...
Thresathresh asked 25/10, 2013 at 11:2

4

Solved

In keeping with Ruby's idiom of using a question mark in boolean methods (e.g. person.is_smart?), I'd like to do the same for an ActiveRecord field in Rails: rails generate model Person is_smart?:...

6

Solved

I have a link that I need to submit a post request with. Normally, I'd use jQuery and prevent the link's default behavior and then submit a form to the destination. This seems like something Rails ...

3

Lets say I have a user model that has many articles. If I call user.articles.new many times I will have many unsaved article objects associated with the user. They are visible when you run user.ar...
Alexis asked 3/1, 2013 at 7:49

1

I just put puts "test" in the seeds file , when I run rake db:seed, I saw there are 2 lines "test"
Honorine asked 20/5, 2012 at 12:15

© 2022 - 2024 — McMap. All rights reserved.