Pardha
Joined
Activity
@Rutul Dave
Is this working? I am agetting ActionController::RoutingError.
Can't we just use sign_in and sign_out helpers from the Devise, instead of stubbing out Warden?
Hi - Simplecov shows that three lines are missing. I don't know what wrong with it. Please have a look at once and let me know your thoughts. sorry - can't add an attachment.
require 'test_helper'
1class GifTest < ActiveSupport::TestCase
1 test "gif_must_be_assigned_to_user" do
gif = Gif.new(name: "Family")
gif.valid?
refute_empty gif.errors[:user]
end
end
This is great! Can we add system tests too? How can we write a system test to create photo and update photos?
It works fine but once I disabled the 2FA and enabled again, I can't log in with the one time password. Did I miss anything?
Thanks,
Pramod
Posted in Form Object for devise authentication
Hi all - I need to create a signup from having company details along with user details. Currently I am using devise for authentication. I would like to create a form object rather than using accept_nested_attributes.
Is there any screencast on this ?
Thanks,
Pardha
Posted in New Site Design!
Great Design Chris! Great work it is.
Thanks Chris! . This is great!
Posted in Liskov Substitution Principle Discussion
I didn't mention any environment while editing my credentials. But I couldn't access my keys in development console and I could see them in production console. Did I miss anything ?
Thanks,
Posted in Rails Application Templates Discussion
While scaffolding I am getting undefined method `model_resource_name' . Did I miss anything?
template': undefined local variable or method `model_resource_name' for #<Erb::Generators::ScaffoldGenerator
Interesting Video! Chris - I am curious to know how Stimulus support external resources. For instance, Datatables, google charts ...
Posted in How much is the cost to get a web design company to build me something I need with Ruby rails?
Hi Everett Clayton,
I have around 10 years of experience on building web applications using Ruby on Rails. Please let me know the requirements, I think I can help you.
You can reach me on Skype: pramod.ror
Thanks,
Pramod
Hi Chris,
I had to set 'this' reference externally to use it in Success callback. But you didn't do that in the video I wonder how that works for you ? Please check the below code snippet SS . https://uploads.disquscdn.c...
Posted in Using symbols is Thread Safe in Rails ?
Hi,
I read a good article about Thread Safe in Rails. Here is the [link](https://bearmetal.eu/theden/how-do-i-know-whether-my-rails-app-is-thread-safe-or-not/).
One thing that I couldn't wrap my head is his example about Class instance variables. My doubt is how just using a symbol becomes thread safe that block of code. Please let me know your thoughts.
You can do one thing, make the location table as single table inheritance pattern. So you have business_location and delivary_location. We can query and set relationships separately. For example
class Profile < ApplicationRecord
has_one :business_location
has_many :delivery_locations
end
Thanks - I am going to build Gem. :)
Yes Jeffrey . I am looking for designerly type of tool.
Posted in Eager Loading on Rails 5.1
Yes Jeffrey . I am noticing N+1 queries when loop over events.
Posted in Eager Loading on Rails 5.1
Hi all,
Seems that the eager loding doen't work in my application. Please let me know whether I need to enable or configure anything. Here is th code for association mappings.
class Event < ApplicationRecord
has_many :receipts, dependent: :destroy
has_many :receipt_happenings, through: :receipts
has_many :receipt_amounts, through: :receipt_happenings, source: :paper_money
end
I could see that the query is running while Iteraing the result set coming from
Event.includes(receipts: {receipt_happenings: :paper_money})