Has anyone one tried to build associations, with nested resource with frienly_id and having difficulties, and if so, how did you go about solving it?
ruby
#user modelUser < ActiveRecord::Base
has_one :user_detail
extend FriendlyId
friendly_id :username#not slugged, a model column, created with user!#user_detail modelUserDetail < ActiveRecord::Base
belongs_to :user
validates :user_id, presence:true#not attr_accessible.#in routes
resources :users, :path => ''
resources :users, :path => '', only: [] do
resource :user_detail, only: [:edit, :update]
end
I've tried everything I could think of to get post requests to work on edit action for user_detail. I've also tried not nesting the the user_detail, still no cigar!
Has anyone one tried to build associations, with nested resource with frienly_id and having difficulties, and if so, how did you go about solving it?
I've tried everything I could think of to get post requests to work on edit action for user_detail. I've also tried not nesting the the user_detail, still no cigar!
Has anyone tried to build associations with friedly_id and having difficulties, and if so, how do you go about solving it?
Based on that i