[Rails] Re: Re: Re: Re: Re: Calling method from model create error

2016-03-06 Thread Naveed Alam
> I suggest concentrating on one error at a time. Fix the other one > then move on to the next. > > Colin I just wanted to tell you this bcoz may it gives u any idea about the error. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Goog

Re: [Rails] Rails 5 does not render when called from javascript/ajax

2016-03-06 Thread Donald Ziesig
On 03/06/2016 07:41 PM, tamouse pontiki wrote: On Sun, Mar 6, 2016 at 5:59 PM, Donald Ziesig > wrote: On 03/06/2016 05:22 PM, Colin Law wrote: On 6 March 2016 at 21:45, Donald Ziesig mailto:don...@ziesig.org>> wrote: ... This is the

[Rails] Re: Beginner Question

2016-03-06 Thread Dave Porter
Would that not normally be just posts_path On Monday, 7 March 2016 07:00:16 UTC+8, Ruby-Forum.com User wrote: > > Hello everyone, I just started off with RoR and had a question. > > I wanted to link my 'Show All Posts' to my allposts.html.erb which will > display all the posts that are created

Re: [Rails] Beginner Question

2016-03-06 Thread tamouse pontiki
On Sun, Mar 6, 2016 at 4:59 PM, Hitesh Sancheti wrote: > Hello everyone, I just started off with RoR and had a question. > > I wanted to link my 'Show All Posts' to my allposts.html.erb which will > display all the posts that are created but I am having difficulty in > doing so. Do I need to defi

Re: [Rails] Rails 5 does not render when called from javascript/ajax

2016-03-06 Thread tamouse pontiki
On Sun, Mar 6, 2016 at 5:59 PM, Donald Ziesig wrote: > On 03/06/2016 05:22 PM, Colin Law wrote: > >> On 6 March 2016 at 21:45, Donald Ziesig wrote: >> >>> ... >>> This is the whole thing (including alerts to let me know when clicks are >>> handled): >>> >>>

Re: [Rails] Rails 5 does not render when called from javascript/ajax

2016-03-06 Thread Donald Ziesig
On 03/06/2016 05:22 PM, Colin Law wrote: On 6 March 2016 at 21:45, Donald Ziesig wrote: ... This is the whole thing (including alerts to let me know when clicks are handled):

Re: [Rails] UJS and native JavaScript

2016-03-06 Thread Walter Lee Davis
> On Mar 6, 2016, at 7:58 AM, Aishwarye Omer wrote: > > Hello, > > Can anyone suggest any good source to understand more about the > implementation of jquery-rails gem and the concept of UJS ? > > Basically I want to know how it works and how UJS is implemented through > Jquery You may be i

[Rails] Beginner Question

2016-03-06 Thread Hitesh Sancheti
Hello everyone, I just started off with RoR and had a question. I wanted to link my 'Show All Posts' to my allposts.html.erb which will display all the posts that are created but I am having difficulty in doing so. Do I need to define this in routes.rb file. I just want to display all posts when t

Re: [Rails] Rails 5 does not render when called from javascript/ajax

2016-03-06 Thread Colin Law
On 6 March 2016 at 21:45, Donald Ziesig wrote: > ... > This is the whole thing (including alerts to let me know when clicks are > handled): > >

Re: [Rails] Rails 5 does not render when called from javascript/ajax

2016-03-06 Thread Donald Ziesig
On 03/06/2016 02:57 PM, Colin Law wrote: On 6 March 2016 at 18:22, Donald Ziesig wrote: Hi Everyone, I am having a problem getting Rails to render a page when it is called from javascript/ajax. I posted a detailed question on StackOverflow but no one has answered yet. (Rails 5 will not render

Re: [Rails] Rails 5 does not render when called from javascript/ajax

2016-03-06 Thread Colin Law
On 6 March 2016 at 18:22, Donald Ziesig wrote: > Hi Everyone, > > I am having a problem getting Rails to render a page when it is called from > javascript/ajax. I posted a detailed question on StackOverflow but no one > has answered yet. (Rails 5 will not render POST made from javascript) > > Bas

[Rails] Rails 5 does not render when called from javascript/ajax

2016-03-06 Thread Donald Ziesig
Hi Everyone, I am having a problem getting Rails to render a page when it is called from javascript/ajax. I posted a detailed question on StackOverflow but no one has answered yet.(Rails 5 will not render POST made from javascript) Basically, I am doing a very simple ajax POST (also tried G

Re: [Rails] Re: Re: Re: Re: Calling method from model create error

2016-03-06 Thread Colin Law
On 6 March 2016 at 12:32, Naveed Alam wrote: >> I don't see that it is related to this problem, but I notice from the >> log that you are doing a GET on add_rosterduty when I think it should >> be a post. Also it seems a bit odd that you make a new RosterDuty and >> save it without setting any da

[Rails] UJS and native JavaScript

2016-03-06 Thread Aishwarye Omer
Hello, Can anyone suggest any good source to understand more about the implementation of *jquery-rails gem and the concept of UJS ?* Basically I want to know how it works and how UJS is implemented through Jquery Thank You Yours Sincerely Aishwarye Omer -- You received this message because

[Rails] Re: Re: Re: Re: Calling method from model create error

2016-03-06 Thread Naveed Alam
> I don't see that it is related to this problem, but I notice from the > log that you are doing a GET on add_rosterduty when I think it should > be a post. Also it seems a bit odd that you make a new RosterDuty and > save it without setting any data in it. Again though, that is not the > cause o

Re: [Rails] Re: Re: Re: Calling method from model create error

2016-03-06 Thread Colin Law
On 6 March 2016 at 11:08, Naveed Alam wrote: >> >> There is not much point putting the log line after the line that is >> causing processing to stop due to the error. Also there is not much >> point putting it anywhere in that bit of code as we already know (from >> the error message) that it is

[Rails] Re: Re: Re: Calling method from model create error

2016-03-06 Thread Naveed Alam
> > There is not much point putting the log line after the line that is > causing processing to stop due to the error. Also there is not much > point putting it anywhere in that bit of code as we already know (from > the error message) that it is nil. I expected that you would put it > in the are

Re: [Rails] Re: Re: Calling method from model create error

2016-03-06 Thread Colin Law
On 6 March 2016 at 09:52, Naveed Alam wrote: > Colin Law wrote in post #1181949: >> On 6 March 2016 at 09:14, Naveed Alam wrote: > model, method name is full_name which says full_name undefined. >>> Extracted source (around line #5): >>> Application Trace | Framework Trace | Full Trace >>> {"

[Rails] Re: Re: Calling method from model create error

2016-03-06 Thread Naveed Alam
Colin Law wrote in post #1181949: > On 6 March 2016 at 09:14, Naveed Alam wrote: model, method name is full_name which says full_name undefined. >> Extracted source (around line #5): >> Application Trace | Framework Trace | Full Trace >> {"id"=>"2"} > Error messages are often a little tricky

Re: [Rails] Re: Calling method from model create error

2016-03-06 Thread Colin Law
On 6 March 2016 at 09:14, Naveed Alam wrote: > Colin Law wrote in post #1181947: >> On 6 March 2016 at 08:00, Naveed Alam wrote: >>>@employee = Employee.find(params[:id]) >>> if request.post? and @rosterduty.save >>> flash[:notice] = t('flash7') >>> redirect_to :controller =>

[Rails] Re: Calling method from model create error

2016-03-06 Thread Naveed Alam
Colin Law wrote in post #1181947: > On 6 March 2016 at 08:00, Naveed Alam wrote: >>@employee = Employee.find(params[:id]) >> if request.post? and @rosterduty.save >> flash[:notice] = t('flash7') >> redirect_to :controller => "employee", :action => "add_rosterduty" >> end >

Re: [Rails] Calling method from model create error

2016-03-06 Thread Colin Law
On 6 March 2016 at 08:00, Naveed Alam 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

[Rails] Calling method from model create error

2016-03-06 Thread Naveed Alam
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