Ruby on Rails Friday, February 12, 2016

Hi!

I'm building my first API with rails and i hope someone can point me in
the right direction.
What I want to know is which tutorials I should watch/read and also
which gems/framework I should use. All tips will be helpful

The API should follow RESTful and HATEOAS (don't have to be strictly)
The API

The requirements for my api is.
* at least json but preferably also xml
* sort resources on dates
* search for a resource in a http request
* get resources belonging to a particular tag
* CRUD

Thanks

--
Posted via http://www.ruby-forum.com/.

--
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/383848e0add06d8ed9017fe2325957dd%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Tuesday, 9 February 2016 18:21:15 UTC-6, Ankit Raj wrote:


On Wednesday, February 10, 2016 at 12:00:42 AM UTC+5:30, Matt Jones wrote:


On Tuesday, 9 February 2016 12:20:37 UTC-6, Ankit Raj wrote:
Hello geeks,

Help me in solving following error.


No route matches {:action=>"create_banner_text", :controller=>"websites", :id=>nil} missing required keys: [:id]

Detail is given on
https://gist.github.com/aj07/794468a5f6f92ea63dfb


On line 48 of the template, you have:

create_banner_text_website_path(@website)

The error indicates that @website is nil, so the create_banner_text_website_path route helper can't generate a URL.

You didn't show the controller code, but that's where I'd recommend you start looking.

--Matt Jones


my controller code


[snip]
 
  def load_website
    @website ||= current_ngo.websites.where(name: params[:template]).first_or_initialize

Looks like I misinterpreted your error in my original reply. This line is the issue. If the call to `first_or_initialize` returns an unsaved object, then a route like

    resources :websites, only: [:index, :create] do
      member do
        get :create_banner_text 

isn't going to be able to generate a URL, since the unsaved object doesn't have an ID.

--Matt Jones

--
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/2c4fc5e7-2685-439a-82db-ca2b7cb85900%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Ok, so it appears that the data is refreshing underneath however the
pages are not re-rendering.

I have a primary page with the jQRangeSlider on it and 18 partials in a
table format.

I can see the data changing in the server window however the charts are
not refreshing.

John

--
Posted via http://www.ruby-forum.com/.

--
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/a7bdd90b63d8fc0e9da6dbea2488e8b6%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.