search for: micropost

Displaying 6 results from an estimated 6 matches for "micropost".

2011 Nov 12
4
No route matches [GET] "/microposts/304"
Hi all, I''m learning Rails by Example (chapter 11), by Michael Hartl ( http://ruby.railstutorial.org/chapters/user-microposts#top) but I got no route matches when I try to delete one micropost. the _micropost html is... <tr> <td class="micropost"> <span class="content"><%= micropost.content %></span> <span class="timestamp"> Posted <%=...
2011 Jul 22
9
Active Record Issue (I think)
I''m following a rails tutorial (Hartl) and it''s been fine so far, but something doesn''t seem to be working right. I have two basic models so far, "User" and "Micropost". class User < ActiveRecord::Base has_many :microposts end class Micropost < ActiveRecord::Base belongs_to :user end If I do something like: "first_user = User.first" Then: "first_user.microposts" - should return a hash of the first user''s microposts,...
2012 Jul 18
3
Undefined method error
...al in order to try to teach myself Ruby on Rails. However, when it tries to render a form designed to allow a user to submit a small message, I get an error saying, "undefined method `model_name'' for NilClass:Class". It says the error is at line 1, which is "<%= form_for @micropost do |f| %>". I have the following defined in app/controllers/microposts_controller.rb: def new @micropost = Micropost.new end I would have expected this code to create a blank Micropost object that gets passed to form_for, but that doesn''t seem to be what happened. I attac...
2013 Mar 02
3
Following railstutorial.org tutorial, how to make the microposts be seen by all?
I am a new learner of Ruby on Rails. I followed through the railstutorial.org tutorial and I''m trying to learn off the sample demo app where you can to make microposts and only the people who are "following" you can see them. If I wanted to make it so every user can see microposts as an additional functionality, what are the steps to do that? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Go...
2012 Jul 19
6
Rendering Partial
I am a bit confused when coming from layout and partials. To start of I have a file called application.html.erb which has my layout such has follow <html> <head> <body> <%= render ''layouts/footer'' %> </body </html> This call a new file _footer.html.erb This file his has follow <footer class="footer"> <nav> <%=
2012 Jul 17
24
Static Pages from Railcast
Hi everyone, I need several pages to be static but also modify when requested. I try following the railcast from Ryan at http://railscasts.com/episodes/117-semi-static-pages?view=comments Here what I have done!! rails g scaffold Pages name:string permanentlink:string title:string author:string access_level:string is_published:boolean meta_description:string meta_keyword:string