Created
February 4, 2016 13:46
-
-
Save Exact1990/8061a3d9b4a1ed2ad9bc to your computer and use it in GitHub Desktop.
types
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 Network::ActionPostType < Network::ActionPost | |
| include Concerns::DefaultPublishedToggle | |
| include Concerns::RequiredPictureType | |
| permit :published, :title, :title_en, :announcement, :announcement_en, :description, :description_en, | |
| :mobile_site_description, :mobile_site_description_en, :mobile_app_description, | |
| :mobile_app_description_en, :has_mobile_site_description, :has_mobile_site_description_en, | |
| :has_mobile_app_description, :has_mobile_app_description_en, :cafe, :delivery | |
| validates :mobile_site_description, presence: true, if: :has_mobile_site_description? | |
| validates :mobile_app_description, presence: true, if: :has_mobile_app_description? | |
| validates :mobile_site_description_en, presence: true, if: :has_mobile_site_description_en? | |
| validates :mobile_app_description_en, presence: true, if: :has_mobile_app_description_en? | |
| 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
| @action_post = Network::ActionPostType.new(params[:network_action_post]) | |
| action_post = resource_network.actual_action_posts.find(params[:id]) | |
| @action_post = action_post.becomes Network::ActionPostType |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment