This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%div{id: "my-id"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register_page "AuthorPage" do | |
content do | |
panel 'メニュー' do | |
link_to '新規作成', admin_authorpage_new_path | |
end | |
table_for authors do | |
column "名前", :name | |
column "性別", :gender | |
column ("name_changed"){ |author| author.name_changed } | |
column ("編集"){ |author| link_to('編集する', admin_authorpage_edit_path(id: author.id)) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= form_tag do | |
= text_field_tag :text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Human | |
include ActiveModel::Model | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An HTTP request has been made that VCR does not know how to handle: | |
GET http://example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect(page).to have_select('book[id]', selected: 'ソフィーの世界') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Book | |
include ActiveModel::Model | |
attr_accessor :title | |
validates :title, presence: true | |
def self.new! (params = []) | |
model = self.new(params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Book | |
def self.example | |
p 'Class' | |
end | |
end | |
module Example | |
class Book | |
#このモジュールの example を呼ぶ | |
def self.call_module_method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
validates :name, presence: true, on: :index | |
validates_length_of :introduction, maximum: 10000. on: :create | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register Example do | |
collection_action :action_name, method: :get do | |
end |
OlderNewer