ruby on rails - RubyOnRails4 How do I exclude properties from a has_many relationship when rendering JSON -


Is there a way to exclude properties: jobs like I have done with the database @? I am new to Ruby and Rail so I doubt (Read: hopefully) that my syntax is wrong and it's an easy problem to fix.

  wants.json {rendere: json = & gt; @ Database ,: included = & gt; [: Jobs],: = Excluding & gt; If your  @ 

"post-text" itemprop = "text">

<: id: created_at: update_at]} < P> Database Object Model class is_maya: Jobs Then, you can:

  Render: Jason => @ Database: (= & gt; {: jobs = & gt; {: except = & gt; [: created_at, updated_at]}}, except: => [: id, created_at, updated_at]) < / Code>   

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -