ruby-on-rails-3
Instance variable in rails - apart from views where can we use it and for how long is it available
I have created a instance variable in rails project, which gets its value from a url parameter like example.com/value. This variable is created in new action, now can it also be used in create action,[详细]
2023-04-13 09:35 分类:问答How do I apply an 'active' class to my navigation based on the current_page in a DRY way? - Rails 3
So in my application.html.erb I have my navigational structure that looks something like this: <div id=\"navigation\">[详细]
2023-04-13 09:30 分类:问答overwrite authenticate_user! in devise gem
I\'m overwriting my au开发者_如何学JAVAthenticate method in my application controller def authenticate_worker![详细]
2023-04-13 08:56 分类:问答Rails + Devise: redirect to a specific url upon public page Facebook Login
I have a public assessable page \"http://www.example.com/gift/5\" There is a Facebook connect button on it.[详细]
2023-04-13 08:38 分类:问答Rails 3 uniqueness validation with scope on polymorphic table
I\'ve got the following setup: class Vote < A开发者_StackOverflow中文版ctiveRecord::Base belongs_to :voteable, :polymorphic => :true, :counter_cache => true[详细]
2023-04-13 08:14 分类:问答With Rails 3, Ruby 1.9.2, how do I make a table sortable on a column that is NOT a DB column?
It is ea开发者_开发问答sy, following this railscast http://railscasts.com/episodes/240-search-sort-paginate-with-ajax to be able to create a table that sorts based on columns that exist in my database[详细]
2023-04-13 07:47 分类:问答How to write directly to database with rails
Basically i would like to bypass def something=(string) ... end and do create!(:something => \"direct to database\")[详细]
2023-04-13 07:45 分类:问答Rails : Why my first page does not show? (routing error)
I use scaffold to create my first MVC in Rails 3.1 rails generate scaffold Post name:string title:string content:text[详细]
2023-04-13 07:45 分类:问答has_many associations table confusing
My goal here is to print list of users from specified city and category with their names, address and club name.Name and address display correctly but when i add club name,says undefined method member[详细]
2023-04-13 07:42 分类:问答How to use HABTM fields in Active Admin filter section?
I\'m using Active Admin 0.3.2, and my database schema includes a few has_and_belongs_to_many relationships.I can create and display records just fine, but attempting to include them in the filter sect[详细]
2023-04-13 07:40 分类:问答