This file contains hidden or 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
| var testCtrl = function($scope) { | |
| $scope.users = [ | |
| {"name": "nakamura", "point": "10"}, | |
| {"name": "hoge", "point": "20"}, | |
| {"name": "ugaugo", "point": "200"}, | |
| ]; | |
| } |
This file contains hidden or 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
| one: | |
| id: 1 | |
| title: 'MyString' | |
| stamp_aws_id: 1 | |
| usertokenid: 'testaaaa1111' | |
| downloadcount: 10 | |
| category: 'words' | |
| rank_display_flag: 0 | |
| stamp_file_name: 'test.jpg' | |
| stamp_content_type: 'jpg' |
This file contains hidden or 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
| private | |
| def update_params | |
| params.require(:hoge).permit(:title, :description, :priority, :status) | |
| end |
This file contains hidden or 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
| localhost: &localnet | |
| /admin/user: | |
| - 192.168.111.22 | |
| development: | |
| <<: *localnet | |
| test: | |
| <<: *localnet | |
| production: | |
| /admin/point: | |
| - 56.2.107.111 |
This file contains hidden or 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 Stamp < ActiveRecord::Base | |
| Paperclip.interpolates :img_dir_num do |attachment, style| | |
| (attachment.instance.id * 0.01).to_i | |
| end | |
| Paperclip.interpolates :filename do |attachment, style| | |
| attachment.instance.id.to_s + ".png" | |
| end | |
| if Rails.env.production? | |
| S3_CREDENTIALS = {access_key_id: ENV['S3_ACCESS_KEY_ID'], secret_access_key: ENV['S3_SECRET_KEY'], bucket: "hoge-bucket"} | |
| end |
This file contains hidden or 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 Stamp < ActiveRecord::Base | |
| ####途中省略#### | |
| if Rails.env.production? | |
| S3_CREDENTIALS={access_key_id:ENV['S3_ACCESS_KEY_ID'], secret_access_key:ENV['S3_SECRET_KEY'], bucket:"hoge-bucket"} | |
| end | |
| if Rails.env.production? | |
| has_attached_file :stamp, storage: :s3, s3_credentials: S3_CREDENTIALS, | |
| styles: {stamps_s:"100x100>",stamps:"350x350>"},url:":s3_domain_url",path:"stamps/:style/:filename" | |
| else | |
| has_attached_file :stamp, url: "/:style/:img_dir_num/:filename" , styles: {stamps_s:"100x100>",stamps:"350x350>"} |
NewerOlder