similar to: Rendering Partial

Displaying 20 results from an estimated 9000 matches similar to: "Rendering Partial"

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
2011 Jun 12
3
Problem with undefined variable current_user
Hi everyone, I''m working through the tutorial at the following link and attempting to customise/adapt the lessons for my own slightly different application. Link: Ruby on Rails Tutorial: Learn Rails by Example | Ruby on Rails 3 Tutorial book and screencasts | by Michael Hartl <http://ruby.railstutorial.org/ruby-on-rails-tutorial-book> I''m currently trying to work
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
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
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here: http://railstutorial.org/chapters/sign-in-sign-out#top At the end of the tutorial, rails is erroring (see below). being new to Rails and after having checked the tutorial... How do you resolve this kind of error. It''s saying current_user is not defined, and it is supposed to be defined with/Sites/sample_app/app/helpers/
2011 Jul 30
22
Question about Helpers
Studying the RoR 3 Tutorial book by Michael Hartl and on page 345 there''s the code inside the SessionsHelper: _________________________________________________________ module SessionsHelper def sign_in(user) cookies.permanent.signed[:remember_token] = [user.id, user.sault] self.current_user = user end end __________________________________________________________ What is the purpose
2012 Nov 06
2
rspec failure upon revisit
I just returned from a different project after taking a few weeks off of my tutorial. I''m using Ruby on Rails 3 Tutorial - Learn Rails by Example by Michael Hartl. After rebooting my server I ran an rspec spec/ command to check to see if there were any problems and this is what I received. I didn''t modify anything except I did overwrite users_controller.rb and
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 =
2013 Mar 21
3
Single page application authentication and authorization
How would I do authentication and authorization in a single page application running with Rails as the backend? Any recommendations? -- 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
2011 Feb 24
1
concurrent users.
If I have: class ApplicationController < ActionController::Base protect_from_forgery before_filter RubyCAS::Filter before_filter :fetch_operator include SessionsHelper private def fetch_operator @operator ||= session[:cas_user] && Operator.find_by_uid(session[:cas_user]) log_out if @operator.nil? end end @operator is available for all controllers of my
2011 Feb 05
4
Questions about Chapter 9: Sign in, Sign out of RoR Tutorial | Learn Rails by Example
Hello Finished reading chapter 9 and im a little bit confused. 1. In the tutorial, Modules are used instead of creating a Model and working in a class inside a module , like in authenticating passwords. Wouldn''t that be possible? Or is it unnecessary since we''re not messing with a database in terms of storing data? 2. what is the difference between session[:remember_token] =
2010 Dec 11
3
Why doesn't Heroku show the Rails default page?
Following chapter (1) of the Ruby on Rails tutorial: http://railstutorial.org/, I was able to successfuly push the application to "Heroku" using: > git push heroku master But, when I open the website, I get a page with the following: App crashed This application is temporarily offline. If you''re the administrator of this app, please check your heroku logs for the backtrace.
2012 Mar 05
8
Create a select with HABM
Hello, I have two tables with association HABM, projects and users, and in projects I want to show all users that was associated to the project. I have try with this: <%= select( "user", "id", Project.all.collect { |p| [ p.name, p.id ] } ) %> But only show all my projects, but Iz don''t know who show only the user in a determinated project. class Project <
2013 Apr 24
3
join table naming
Hi, I’m an amateur learning rails and could use some help… I created a join table “pictures_questions” and append to it in the following way: @picture = Picture.new(params[:picture]) … if @picture.save @question.pictures << @picture Everything works fine but honestly I think I got this working by sheer luck and trial and error. I have 2 questions: 1. I do not understand the
2012 Jun 27
2
Select Helper Array of Array + Filter
Noob alert! Hi, I am having trouble figuring out how to filter a select helper. The following shows all of the rows in the table but I would like to filter the collection from the list_name column (:list_name => "Project Status"): @project_status = Valuelist.all.collect {|s| [s.list_value,s.id]} Thanks in advance, James -- Posted via http://www.ruby-forum.com/. -- You received
2012 Aug 28
4
ArgumentError in HomeController#index
Hey guys, I''m new to ruby/rails and trying to sort something... I just created an app with composer, http://railsapps.github.com/rails-composer/ I used the command: rails new myapp -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb I set up the rails server, and tried to load the app on localhost:3000 However, I end up with: ArgumentError in HomeController#index
2012 Aug 17
5
How to Include Gem in Different Path
Hi, I just tried Ruby on Rails (with RailsInstaller 2.1.0) and it works fine on my PC. However, when I put this on the website, I got the following error message: Could not find multi_json-1.3.6 in any of the sources (Bundler::GemNotFound) The problem is that the website has multi_json 1.0.4. The website allows me to download my own gems, but after the process, it is located at
2012 Jun 27
5
explanation required on def method = (.)
hello, i''ve come across a code like def password=(pass) @password = pass . . end Anyone can please explain to me what is happening in the first line itself for the def part? the code I saw did not provide anything on it -- 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
2011 Jan 03
8
Heroku, needs constant AppController updates?
Dear All, Fairly new to rails and Heroku, so could be doing something wacky - do let me know if you think my code practice is off, even if unrelated to this error, I''d like to learn! I''m using Rails 3.0.0, ruby 1.8.7, and ''sqlite3-ruby'', ''1.2.5'', :require => ''sqlite3''. I''ve got an application that goes off and
2011 Oct 18
15
Generate model from database
hello i want to ask, how to generate model from table in my database. That''s possibel ? -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send