Hi, Glad to see you are back and active again @remiprev
I have a model
class Branch
include Her::Model
belongs_to :Shop
attributes :email, :address_line1,
:address_line2, :landmark, :pin,
:phone, :settlement_time
.... more stuff ..
end
and Shop.rb
class Shop
include Her::Model
has_many :branches
... more stuff....
end
and in the controller for Branches I'm doing a update action
def update
@shop = Shop.find(params[:merchant_id])
@shop.branches.assign_attributes(branch_params)
respond_to do |format|
if @shop.branches.save
format.html { redirect_to @branch, notice: 'Branch was successfully updated.' }
else
format.html { render :edit }
end
end
end
This leads to undefined method "assign_attributes" for #<Her::Collection:0x00000106fc2860>
also If i try to do save on @branch then i calls PUT the url www.example.com/ branch/1 instead of www.example.com/ shop/1/branch/1
Hi, Glad to see you are back and active again @remiprev
I have a model
and Shop.rb
and in the controller for Branches I'm doing a update action
This leads to
undefined method "assign_attributes" for #<Her::Collection:0x00000106fc2860>also If i try to do save on
@branchthen i calls PUT the url www.example.com/branch/1instead of www.example.com/shop/1/branch/1