Questions tagged [rails-4-2-1]

For issues specific to the minor release of version 4.2.1 of Rails. If your question applies to Ruby on Rails in general, use the tag [ruby-on-rails]

46 questions
11
votes
1 answer

found unpermitted parameters: utf8, authenticity_token only for update method

I have the update method in user managements controller like this def update @user.update(user_permitted_params) redirect_to admin_user_managements_path end My strong parameters is set as def user_permitted_params …
kurian mathew
  • 111
  • 1
  • 3
10
votes
1 answer

Singleton can't be dumped - cached_resource gem

Using cached_resource gem for caching active resources. User model class User < ActiveResource::Base cached_resource class teachers < SimpleDelegator attr_accessor :teacher_id def initialize(attributes = {}, _persisted = true) …
9
votes
4 answers

Cloning a relation in rails

I'm getting deprecation errors on an upgrade to rails 4.2.1, Modifying already cached Relation. The cache will be reset. Use a cloned Relation to prevent this warning. The action I'm trying to run gets number of users by month who have logged in. My…
Yule
  • 9,170
  • 3
  • 48
  • 71
7
votes
1 answer

rails 4 When is "inverse_of" required?

I am developing a web app using rails 4 for the first time. I am making all of my model associations bidirectional and using inverse_of wherever it is allowed. From reading the documentation, I've developed the impression that this is probably the…
6
votes
2 answers

Upgrading Rails 3.2 to Rails 4.2 getting 401 unauthorized

When I updating to from rails 3.2 to rails 4.2 the gems are all compatible for rails 4 was cross checked with this when I run server it will throwing error as below. Processing by HomeController#index as HTML Completed 500 Internal Server…
Jagdish Barabari
  • 2,613
  • 2
  • 18
  • 21
5
votes
1 answer

How do I query with JSON function/operator where key is either not null or is null?

I am looking for the active record version of the following sql code: select * from users where (details->'email') is not null Let's say that my User model has a json field called, details, and some records will have an email key-value and some…
robskrob
  • 1,986
  • 3
  • 19
  • 36
4
votes
1 answer

Show all authorizations by registers

I have this problem: I have a controller: def index if params[:search_employee_by_cpf].present? @employees = Employee.search_cpf(params[:search_employee_by_cpf]).all @authorizations =…
Elton Santos
  • 469
  • 4
  • 24
4
votes
2 answers

Can we breakdown a large mini-test file (some_controller_test.rb) into multiple test files

I have a controller named reports in my rails applications. This controller have 4 or 5 (reports) actions and not a very large file. I am using mini-test for testing my application. The test file of this controller (reports_controller_test.rb) is…
wasipeer
  • 930
  • 8
  • 22
4
votes
1 answer

Using devise_token_auth with form auth

I'm trying to allow using on mobile devices to be authenticated using a token, while still using the webforms for the web application. I decided to use devise_token_auth. Whenever I try and start the application I get an error because a session path…
Antarr Byrd
  • 20,852
  • 26
  • 85
  • 154
3
votes
2 answers

Debug Levels Rails - The level ":debug" show all logs. I want ONLY ERRORS. Is it possible?

I have an app in AWS Ec2 and I want to see the errors ( 500, 502, 50x, 403, 404 etc. ) ina log file. The file config / environments / production.rb Have the code: config.log_level = :debug I tried to change this to :warn, :info, :error,…
Diego Somar
  • 839
  • 1
  • 10
  • 23
3
votes
2 answers

PG::ConnectionBad upgrade to Yosemite and postgresql 9.4.4

I just updated my mac OS X to Yosemite, version 10.10.4, and postgresql to: psql (PostgreSQL) 9.4.4. After running rake db:migrate on my Rails 4.2.1 application, my terminal session is responding with: rake aborted! PG::ConnectionBad: could not…
robskrob
  • 1,986
  • 3
  • 19
  • 36
2
votes
1 answer

Database.yml - setting up environment groups

Using ruby 2.5, rails 4.2.11, I'm setting up a dev environment for a ruby project that used to just send straight to production. HotWire contains application specific data while QualityDC contains much of the relational information shared by the…
2
votes
2 answers

How to insert data in product table with user id rails 4

Hello I am absolute newbie in rails. creating some application but stuck on some point. The problem is I want to insert data in products as per user id but it is saying: uninitialized constant ProductController Here is my route…
user5084534
2
votes
1 answer

Rails 4: turbo-links change mouse cursor when loading

when using rails 4 turbo-links, how do you change the mouse cursor to progress when a link is clicked? i have tried this with no success: application.js.erb $(function() { $(window).ajaxStart(function() { $(this).css({'cursor' :…
amitben
  • 622
  • 10
  • 19
2
votes
3 answers

undefined local variable or method `resource_class' in devise

I am trying add a attribute called username to devise but rails shows me an error in the following line of code I am using rails 4.0.0 and devise 3 def configure_permitted_parameters devise_parameter_sanitizer.for(:sign_up) { |u|…
juan perez
  • 323
  • 5
  • 14
1
2 3 4