Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • You're right, I keep forgetting that these dynamic finders are gone in the new rails. Thanks! Commented Jul 19, 2013 at 21:39
  • I just looked at the docs, and they're actually deprecated in Rails 4, and will be gone in 4.1. Thought I read somewhere they would be removed in 4 already, but guess I was wrong. Not using them anymore is best practice anyway ;) Commented Jul 19, 2013 at 21:41
  • Yes indeed, I've deleted my answer. Yours is the best. Commented Jul 19, 2013 at 21:42
  • Ah ok that makes sense. I'll take a look at that when I get to work. Thanks @fivedigit Commented Jul 22, 2013 at 11:42
  • Ok guys I was able to get it to return json, but now it's showing nil unless I set Employee.where(clock_no: '1684'). Then it returns the data from the server in json format. Is there something else I could be missing? Do you need me to edit and post current code? Commented Jul 22, 2013 at 17:46