Online schools to learn

  • Free code camp … 800 hrs of coding to prep you for volunteering time to get real world experience. Link
  • http://www.thinkful.com/
  • Launchschool’s Capstone Mentoring – 10% of your first year employed – Link
  • Viking Code School –
    • Immersive: $12k flat or 20% of first year (paid in first 6 months) of working – Link
    • Flex
      • ~$300 / month – forum, chat, weekly mentor checkins, live virtual office hours
      • ~$600 / month – all of the above plus 1 on 1 mentor
      • ~$1400 / month – career mentoring, custom paths, 3 meetings a week

Cells 4.0 – Goodbye Rails! Hello Ruby!

interesting…apparently their “new” site is down already though 😦

Nick Sutterer

The Cells gem has helped many developers to re-structure and re-think their view layer in Rails. It provides view models that embrace parts of your UI into self-contained widgets.

What was partials, filters, helpers and controller code is now moved into a separate class. View models are plain Ruby and use OOP features like inheritance while benefiting from encapsulation. The times of global view namespace and lack of interfaces in views are over.

class CommentCell < Cell::ViewModel
  def show
    render
  end

private
  def author_link
    link_to model.author
  end
end

Cells can render their own views which sit in a private directory.

Logicless Views.

In views, we try to gently enforce simplicity: When calling a method in the view, it is called on the cell instance. The view is always executed in cells context. There is no concept of “helpers” and data being copied between controller and view anymore.


Written by 

Every…

View original post 1,308 more words

Rails way? Rendering partials

Laying out some thoughts for myself here ...

So, I’ve been inserting partials for awhile …

At first I was sending only rails generated & cocoon gem partials.  Using the collections method I think.  :f => @controller_declared_model

When reading again from the rails guides – Link – I found you can feed in an array of values.  The documentation claims you can then render the layout of each with no effort.

I’m trying to find a way to feed a partial a controller declared dataset, which would allow me to create subsets of the Player.all & feed them in to be rendered.

Local or collection seems to be it … but I’m curious if these will still allow me to use the rails magic in links for editing/viewing etc.  More to follow when done testing.