I am building and application which uses following railscast of Ryan
1. Authentication from scratch
2. Cancan for authorization
3. Multitenancy with scope.
4. Model name in url
It was working fine till the Multitenancy with scope but after implementing model-name in url i get following error in show action.
Couldn't find Article with id=batman-robin [WHERE "articles"."tenant_id" = 1]
If I comment out "load_and_authorize_resource" from controller the show action starts working. Can someone help me out with it?
I am building and application which uses following railscast of Ryan
1. Authentication from scratch
2. Cancan for authorization
3. Multitenancy with scope.
4. Model name in url
It was working fine till the Multitenancy with scope but after implementing model-name in url i get following error in show action.
Couldn't find Article with id=batman-robin [WHERE "articles"."tenant_id" = 1]
If I comment out "load_and_authorize_resource" from controller the show action starts working. Can someone help me out with it?
hello I am trying to save to the field society_id which takes the data from User table (current_user.society_id). I am using Devise.
def self.ids_from_tokens(tokens)
tokens.gsub!(/<<<(.+?)>>>/) { create!(name: $1, society_id: current_user.society_id).id}
tokens.split(',')
end
It gives an error undefined variable current_user.
Current_user is defined by Devise for controller and view but it doesn't work with model i guess.
can someone help me how to make it work
Hi Ryan
Please please do an episode on CRUD in datatable and export features of it.
Hi Ryan
Can you cover other features of data table in rails cast? features like add, delete, edit.