On 6 March 2016 at 08:00, Naveed Alam <lists@ruby-forum.com> wrote:
> Dear Experts/Friends
>
> I created a model for and moved it to a sub folder in my model's
> directory.
>
> Then wrote in the existing controller named employee the below code to
> add roster duty.
>
> def add_rosterduty()
> @rosterduty = RosterDuty.new()
> @employee = Employee.find(params[:id])
> if request.post? and @rosterduty.save
> flash[:notice] = t('flash7')
> redirect_to :controller => "employee", :action => "add_rosterduty"
> end
> end
>
> and below is the view, where I want to call method from the Employee
> model, method name is full_name which says full_name undefined.
Can you copy/paste the full error message please.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsDeCMdQqgJOYcgE%2BqX3CTYkajg5F5-8gF%3D3WM%3D6P5Gqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment