similar to: regarding the controller and view

Displaying 20 results from an estimated 40000 matches similar to: "regarding the controller and view"

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
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> <%=
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 <
2012 Sep 20
6
Good books about the internals of Rails 3
Hi, I''m a new RoR and Ruby developer and I''m searching for some good resources (books or website) that go a little further than books like the railstutorial (which is excellent btw). But after reading this, I feel like as long as I''m working with scaffolding and simple gems, it''s ok, and a lot can be accomplished with this but I would like to have a deeper
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
2013 Oct 21
6
I think I've found a mistake in Rails tutorial
At the point of this section *http://ruby.railstutorial.org/chapters/sign-up#sec-signup_failure*<http://ruby.railstutorial.org/chapters/sign-up#sec-signup_failure> clicking the "Create my account" button on the signup form shows the following image at <http://ruby.railstutorial.org/images/figures/signup_failure_rails_4.png> According to the tutorial, I must modify
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
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
2013 Oct 21
8
git push not working
<https://lh4.googleusercontent.com/-IA0TutFw54A/UmVnJwi7CHI/AAAAAAAAAzg/fEZFf_kHsug/s1600/git.gif> Hi again, I''m working on http://ruby.railstutorial.org section http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-git_push I''m trying to push the repository to the remote site but what ever I fials. I''ve updated, removed the s of the https etc but still
2011 Sep 28
13
First time with Ruby - how to print "Hello World!" via web-server
Hello Everyone, first off - I''m NOT a programmer. I know HTML/CSS very well and PHP quite well, yet not I''m in need of a more "active" language and I''ve decided to go with Ruby. Thing is, I''ve been able to find ton of tutorials, but NOT ONE answers the most basic question - what exactly do I have to upload to the server to simply get a (any) response
2010 Dec 29
5
Beginer: Question about routing on Rails 3
I bought this book about rails for beginers (head first Rails) and its quite simple and good for someone who has no clue about Rails (or any other language) On chapter two it talks about routing but unfortunately the book is for rails 2 and i have rails 3 installed on my mac. The line i have to enter in the config/routes.rb of my application is: map.connect ''/ads/:id'',
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
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
2010 Mar 11
4
Call a controller method from a view
Hi, I am trying to call a controller method from my view, but I get an error and I don''t know how to correct it. What i am trying to do: I am in the edit form of the model Product, and products can have many ingredients. So on my edit form there is a text_field where you type the ingredient with a link "Add" which is supposed to add the typed ingredient to the current
2012 Nov 30
4
Tokeninput incremental search not working
Rails 3.1.3 After watching http://railscasts.com/episodes/258-token-fields?autoplay=true I have installed the similar functionality to my app. However, def index @cities = City.all ... does in fact give the list of all cities in the text field, but def index @cities = City.where("name like ?", "%#{params[:q]}%") ... does NOT
2013 Jan 28
1
How to start working on reby on rails
Hello Friends, I am new to Ruby on Rails actually i am .net developer, i installed rails frame work and Aptana Studio3 in my system, i am not getting Idea how to start working on ruby on rails , please help me , how to start working on ruby on rails, if any one have sample project that helps me a lot. Thanks in Advance V.Venkat -- Posted via http://www.ruby-forum.com/. -- You
2012 Sep 20
4
access controller's object attributes in view page
Hi, I am new to ROR and learning it. In my controller I have an admins record and I am passing that admin object to the admin''s view page to get the name of the admin. But when I try to access the name it is showing error as "undefined method `name'' for :current_admin:Symbol".. Please help.. Please find my code below Sessions Controller def create
2012 Aug 25
6
Ruby Cgi and Mysql/Postgresql
Hi i m very new in ruby ( i used to work on php) I am looking for good documentation or book which will show me how to use ruby with CGI + mysql /Postgresql something like, will show how to grab data from database and pass those into Select or combox box .. i tryed to look for books but i have not find any so good documentation site, books would be good Thnaks -- Posted via