aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
Commit message (Collapse)AuthorAgeFilesLines
...
* | remove test/dummy from gitignore when "plugin new -T"Francesco Rodriguez2012-07-031-0/+2
| |
* | Merge pull request #6856 from lexmag/polymorphic_generatorsCarlos Antonio da Silva2012-06-271-2/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Add polymorphic option to model generator For instance, $ rails g model Product supplier:references{polymorphic} generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration.
| * | Add polymorphic option to model generatorAleksey Magusev2012-06-271-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For instance, $ rails g model Product supplier:references{polymorphic} generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration. Also fix model_generator_test.rb#L196 and #L201
* | | Merge pull request #6839 from bcardarella/async-actionmailerAaron Patterson2012-06-261-0/+3
|\ \ \ | |/ / |/| | Async actionmailer
| * | Add commented out ActionMailer async config optionBrian Cardarella2012-06-231-0/+3
| | |
* | | ruby 1.9 hash syntax for generated codeRichard Huang2012-06-235-12/+12
|/ / | | | | | | | | | | | | | | app/controllers/application_controller.rb app/views/layouts/application.html.erb config/application.rb config/routes.rb test/performance/browsing_test.rb
* | use system tmpdir rather than our ownAaron Patterson2012-06-191-2/+10
| |
* | Change minimum (default) log level in PostgreSQL to warning.kennyj2012-06-182-4/+4
| |
* | Require thor 0.15.3 onwardsJosé Valim2012-06-181-0/+1
| |
* | Merge pull request #6692 from schneems/schneems/something-went-wrongJosé Valim2012-06-102-0/+2
|\ \ | | | | | | Add Prompt to 404 & 500 Pages to Check Logs in Production
| * | add prompt to 404 & 500 pages to check logsschneems2012-06-092-0/+2
| | | | | | | | | When new programmers push their code to a production server and receive an error they often don't know to check the logs, this simple reminder will help. Most professional applications have custom error pages so this change shouldn't affect them. The wording of the message should not confuse non-developer visitors.
* | | Merge pull request #6665 from schneems/schneems/raise-migration-errorJosé Valim2012-06-102-0/+5
|\ \ \ | |/ / |/| | Notify A User they Have Pending Migrations
| * | raise error for pending migration schneems2012-06-092-0/+5
| | | | | | | | | can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
* | | Merge pull request #6681 from arunagw/plugin_gen_fixRafael Mendonça França2012-06-081-1/+1
|\ \ \ | | | | | | | | Plugin gen fix
| * | | We should not include engine.rake file into rakeArun Agrawal2012-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if we are passing -T which is skip_test_unit See issue #6673 for more details. I saw that we are not creating dummy app even if we do skip_test_unit. Fixes #6673
* | | | Don't add sqlite3 to gemspec with -O on rails plugin newPiotr Sarnacki2012-06-081-0/+2
|/ / / | | | | | | | | | (closes #6672)
* | | Merge pull request #6597 from frodsan/am_include_root_to_falseRafael Mendonça França2012-06-071-4/+4
|\ \ \ | | | | | | | | change AMS::JSON.include_root_in_json default value to false
| * | | change AMS::JSON.include_root_in_json default value to falseFrancesco Rodriguez2012-06-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: * Update `include_root_in_json` default value to false for default value to false for `ActiveModel::Serializers::JSON`. * Remove unnecessary change to include_root_in_json option in wrap_parameters template. * Update `as_json` documentation. * Fix JSONSerialization tests. Problem: It's confusing that AM serializers behave differently from AR, even when AR objects include AM serializers module. class User < ActiveRecord::Base; end class Person include ActiveModel::Model include ActiveModel::AttributeMethods include ActiveModel::Serializers::JSON attr_accessor :name, :age def attributes instance_values end end user.as_json => {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true} # root is not included person.as_json => {"person"=>{"name"=>"Francesco", "age"=>22}} # root is included ActiveRecord::Base.include_root_in_json => false Person.include_root_in_json => true # different default values for include_root_in_json Proposal: Change the default value of AM serializers to false, update the misleading documentation and remove unnecessary change to false of include_root_in_json option with AR objects. class User < ActiveRecord::Base; end class Person include ActiveModel::Model include ActiveModel::AttributeMethods include ActiveModel::Serializers::JSON attr_accessor :name, :age def attributes instance_values end end user.as_json => {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true} # root is not included person.as_json => {"name"=>"Francesco", "age"=>22} # root is not included ActiveRecord::Base.include_root_in_json => false Person.include_root_in_json => false # same behaviour, more consistent Fixes #6578.
* | | | reduce number of StringsAkira Matsuda2012-06-061-1/+1
| | | |
* | | | Make method name consistent with existing methodsAndrew White2012-06-062-4/+4
| | | |
* | | | Fixed the application_controller require_dependency path generated by the ↵Fred Wu2012-06-062-5/+6
| | | | | | | | | | | | | | | | app generator
* | | | Fixed the Gemfile when gemspec is skipped in the 'rails plugin new' commandFred Wu2012-06-051-0/+15
|/ / /
* | | remove unneeded blank line from !namespeced? controller generatorsAkira Matsuda2012-06-012-2/+2
| | |
* | | Changed symbol platform to platforms for the commented out call to gem ↵Martin O'Connor2012-05-301-1/+1
|/ / | | | | | | | | | | 'therubyracer'. Dependency.rb expects the symbol to be named :platforms as opposed to platform. RubyMine's inspections indicate that the symbol should be named :platforms.
* / update Gemfile template to 1.9 hash syntaxFrancesco Rodriguez2012-05-291-1/+1
|/
* `name` should be public.Aaron Patterson2012-05-241-12/+12
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-05-231-2/+1
|\
| * Revert "Remove blank trailing comments"Vijay Dev2012-05-235-0/+18
| | | | | | | | | | | | | | | | | | | | This reverts commit fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a. Reason: Not a fan of such massive changes. We usually close such changes if made to Rails master as a pull request. Following the same principle here and reverting. [ci skip]
| * Remove obsolete comment from generator gem methodAlexey Vakhov2012-05-221-2/+1
| | | | | | | | | | This comment about :env option for gem method was actual for rails 2.3 without bundler. Now bundler uses grups for this goal.
| * Remove blank trailing commentsHenrik Hodne2012-05-205-18/+0
| | | | | | | | | | | | | | For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed.
* | Move root method at TOP of routes fileGaurish Sharma2012-05-221-3/+4
| | | | | | | | | | | | | | | | Made the change as per the following text in routing guide:- "You should put the root route at the top of the file, because it is the most popular route and should be matched first." However, if root is best left at bottom. We will change to fix that text
* | Use new hash syntax for generators gem methodAlexey Vakhov2012-05-222-2/+2
| | | | | | | | | | | | The Gemfile of new application uses ruby 1.9 hashes. Gem method of generators should use them too. It prevents from mixing two kinds of syntax in one file.
* | Use require_dependency in generated controllersPiotr Sarnacki2012-05-222-2/+2
| | | | | | | | | | | | | | Using require in development mode will prevent required files from reloading, even if they're changed. In order to keep namespaced application_controller reloadable, we need to use require_dependency instead of require.
* | Fix generators to help with ambiguous `ApplicationController` issuePiotr Sarnacki2012-05-203-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In development mode, dependencies are loaded dynamically at runtime, using `const_missing`. Because of that, when one of the constants is already loaded and `const_missing` is not triggered, user can end up with unexpected results. Given such file in an Engine: ```ruby module Blog class PostsController < ApplicationController end end ``` If you load it first, before loading any application files, it will correctly load `Blog::ApplicationController`, because second line will hit `const_missing`. However if you load `ApplicationController` first, the constant will be loaded already, `const_missing` hook will not be fired and in result `PostsController` will inherit from `ApplicationController` instead of `Blog::ApplicationController`. Since it can't be fixed in `AS::Dependencies`, the easiest fix is to just explicitly load application controller. closes #6413
* | Merge pull request #3359 from mrreynolds/datamapper_naming_fixRafael Mendonça França2012-05-191-1/+1
|\ \ | |/ |/| Fixed DataMapper namings in symbols and constants.
| * Fixed DataMapper namings in symbols and constants.Robert Glaser2011-10-181-1/+1
| |
* | Remove delegated methods from generators test caseCarlos Antonio da Silva2012-05-191-1/+0
| | | | | | | | | | | | | | `class_attribute` already generates instance readers/writers by default, so there's no need to add delegation methods. Removes some "method redefined" warnings.
* | Revert changes related to `bundle install` fixes in `rails new`Piotr Sarnacki2012-05-171-10/+1
| | | | | | | | | | | | | | | | | | | | | | Reverted changes: f3482a9 Fix tests in railties 5904295 improve #6318 aed906a prevent using already loaded Gemfile for 'bundle install' In order to fix this, we need a fix in bundler related to GEM_PATH, which will allow to run tests properly. I will get this changes back when it happens.
* | Merge pull request #6337 from bcardarella/patch-1Aaron Patterson2012-05-161-1/+1
|\ \ | | | | | | Changing the indentation level of the block comment close for Sass
| * | Changing the indentation level of the block comment close for SASS Brian Cardarella2012-05-151-1/+1
| | | | | | | | | If one wants to use use SASS for application.css.sass the comment block indentation is invalid.
* | | improve #6318Michal Papis2012-05-151-4/+5
|/ /
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-05-153-49/+0
|\ \ | | | | | | | | | | | | Conflicts: actionpack/lib/action_view/helpers/asset_tag_helper.rb
| * | Removing ==Examples and last blank lines of docs from railtiesFrancesco Rodriguez2012-05-143-49/+0
| | |
* | | prevent using already loaded Gemfile for 'bundle install', fix #6314Michal Papis2012-05-151-0/+8
| | |
* | | Remove dates and environment variables from humans.txtJosé Valim2012-05-141-2/+0
| | |
* | | Since escape_html_entities_in_json was moved to 3-2-stable, make it true in ↵José Valim2012-05-141-3/+0
| | | | | | | | | | | | AS, closes #6287
* | | Remove remaining require 'rubygems'Santiago Pastorino2012-05-131-1/+1
| | |
* | | require "rubygems" is obsolete in Ruby 1.9.3Kornelius Kalnbach2012-05-133-4/+0
| | |
* | | Remove tailing spaces :scissors: [ci skip]Rafael Mendonça França2012-05-121-1/+1
|/ /
* | s/wether/whether [ci skip]Vijay Dev2012-05-121-1/+1
| |