ruby-on-rails-3
Output the name of the view being rendered in rails 3.1
How does this translate to Rails 3.1? @template.instance_variable_get(:@_first_render).name It\'s supposed to output the name of the view being rendered. Note: it\'s not always the same as params开[详细]
2023-04-12 19:26 分类:问答How can I change the action a form submits to in a jQuery autosave submission? (In Rails)
I have a Comment model that I want people to be able to save drafts for. It has a boolean attribute \"draft\" that allows the comment to be saved (but not show up yet). I\'m creating an autosave funct[详细]
2023-04-12 19:02 分类:问答Rails fields_for not passing all params
I have a form that updates two differe开发者_如何学编程nt models using fields_for. The data for the elements inside the fields_for are getting submitted but the ones for the original form_for are miss[详细]
2023-04-12 18:38 分类:问答Is there an equivalent of ActiveRecord::Relation.update_all that triggers callbacks/observers?
I want to perform a bulk update of ActiveRecord models, along the lines of: MyModel.where(:field1=>\"value1\").update_all(:field1=>\"value2\")[详细]
2023-04-12 18:38 分类:问答PDFKit gem can not hide link - Rails 3
Hello people I was following this tutorial to generate a \"pdf\" file from a view in my rails app. Everything was ok, until I tried to hide the \"link to download\". Everytime I generate the PDF fi[详细]
2023-04-12 18:31 分类:问答How to include an id in the nested form?
I have a nested form ,and i want to include city_id in the stores model,is this <%= s.hidden_field :city_id, @city.id %> correct? If yes what do i add in the controller after that? If it is not[详细]
2023-04-12 18:12 分类:问答Creating Rails 3.1 app with Postgresql database (OSX Lion)
I cant seem to find an up-to-date guide to creating a new Rails 3.1开发者_StackOverflow社区 app with a Postgresql database. I would greatly appreciate a guide through that process.Since Rails 3, the f[详细]
2023-04-12 18:07 分类:问答Rails how to sort mulitple columns using where?
How do I order an instance variable using two columns? I want to order after reel_order and reel_online which as a boolean and should be true.[详细]
2023-04-12 17:55 分类:问答What does this sql statement in the log means?
For some reason the view is blank even though there is data in the database.In the log shows sql statement selecting the tables but i dont really understand it,Can anybody help me ,what is going on he[详细]
2023-04-12 17:54 分类:问答How to compare values from two databases(mysql) in rails-3 application
How to compare under given two fields in rails application Database1 : report_db, table name : detail,[详细]
2023-04-12 17:47 分类:问答